This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Breakpoint mechanism (breakpoint.c)


Liang, James writes:
 > Hello,
 > 
 > I'm trying to port GDB and I can't quite understand what's happening with
 > the breakpoint mechanism in
 > breakpoint.c
 > 
 > I've overwritten all of the set breakpoint modules in gdbarch.c, to go to
 > one of my functions that prints
 > "hello", but none of them are ever called.  Whenever I try to set a
 > breakpoint, gdb just acts like the breakpoint
 > was successfully set.
 > 
 > It looks like the work is setting the breakpoint is done in
 > create_breakpoints which calls set_raw_breakpoint.  I just
 > don't see where it goes from there.  As far as I can tell, it never calls
 > any architecture specific code or does anything except a few prints and
 > setting a few state variables. 

Nothing happens on the target side until execution is resumed.
It's at that point that gdb calls the code to insert the breakpoint
on the target.  Grep for calls to insert_breakpoints.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]