* the breakpoint of gdb
@ 2006-10-13 17:53 s88
2006-10-13 19:05 ` Michael Snyder
2006-10-13 19:37 ` ramana.radhakrishnan
0 siblings, 2 replies; 3+ messages in thread
From: s88 @ 2006-10-13 17:53 UTC (permalink / raw)
To: gdb
Hi all:
Could anyone tell me something about how the gdb to achieve the the
breakpoint function in different platform?
I heard the gdb's breakpoint implement on the X86 platform is by the
instruction patch. It sounds interesting!! I want to know more
details.
Any reference info, web page, books are welcome.
Thanks,
Dave.
--
System on Chip Design Lab.
Dept. of Computer Science and Information Engineering,
National Chung Cheng University
E-mail : s88.tw@acm.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: the breakpoint of gdb
2006-10-13 17:53 the breakpoint of gdb s88
@ 2006-10-13 19:05 ` Michael Snyder
2006-10-13 19:37 ` ramana.radhakrishnan
1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2006-10-13 19:05 UTC (permalink / raw)
To: s88; +Cc: gdb
On Sat, 2006-10-14 at 01:53 +0800, s88 wrote:
> Hi all:
>
> Could anyone tell me something about how the gdb to achieve the the
> breakpoint function in different platform?
Thru a platform_specific method (function pointer) called
"target_insert_breakpoint". Each target or platform defines
this function as appropriate.
Look for "target_insert_breakpoint" in breakpoint.c and target.h,
then grep for "to_insert_breakpoint" in *.c.
> I heard the gdb's breakpoint implement on the X86 platform is by the
> instruction patch. It sounds interesting!! I want to know more
> details.
Yes, the most common method is to insert a trap instruction
(or similar) into memory. See function "memory_insert_breakpoint"
in mem-break.c. Again, each target platform has to define the
appropriate bit-pattern or instruction to be inserted.
> Any reference info, web page, books are welcome.
Hah. If you write that book, you will become famous. ;-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: the breakpoint of gdb
2006-10-13 17:53 the breakpoint of gdb s88
2006-10-13 19:05 ` Michael Snyder
@ 2006-10-13 19:37 ` ramana.radhakrishnan
1 sibling, 0 replies; 3+ messages in thread
From: ramana.radhakrishnan @ 2006-10-13 19:37 UTC (permalink / raw)
To: s88; +Cc: gdb
> Any reference info, web page,> books are welcome.
Atleast as a student "How Debuggers Work" was useful and interesting to
read. However to paraphrase my compiler guru.
In theory there is no difference between theory and practice :)
Good luck.
-Ramana
>
>
> Thanks,
>
>
> Dave.
>
>
> --
> System on Chip Design Lab.
> Dept. of Computer Science and Information Engineering,
> National Chung Cheng University
> E-mail : s88.tw@acm.org
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-13 19:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-13 17:53 the breakpoint of gdb s88
2006-10-13 19:05 ` Michael Snyder
2006-10-13 19:37 ` ramana.radhakrishnan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox