This is the mail archive of the gdb-patches@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]

Re: [PATCH] Improved support for overlay breakpoints in ROM


Jim Blandy wrote:
> 
> Michael Snyder <msnyder@redhat.com> writes:
> 
> > Jim Blandy wrote:
> > >
> > > Typo:
> > >
> > > > +     /* On the same principal, an overlay manager can arrange to call a
> > >
> > > s/principal/principle/
> > >
> > > It seems to me that, if overlay management is disabled, or set to
> > > `manual', we shouldn't even set a breakpoint in _ovly_debug_event.
> >
> > By analogy with the longjmp breakpoint, it seems easiest just to
> > create the breakpoint when the symbol file is loaded, and then
> > enable/disable it as needed.  When it is disabled, it doesn't
> > represent any significant overhead.
> 
> Okay, I see.
> 
> > > We need to document the new rules in the GDB manual.
> >
> > Yep.
> 
> ... How can we prevent this from falling through the cracks?  I don't
> mind doing it, but I'm afraid I'm going to forget.

How's this?
2002-02-06  Michael Snyder  <msnyder@redhat.com>

	* gdb.texinfo (overlays): Mention new magic symbol
	'_ovly_debug_event', which allows GDB to keep better track
	of overlays.

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.85
diff -p -r1.85 gdb.texinfo
*** gdb.texinfo	2002/02/01 18:41:51	1.85
--- gdb.texinfo	2002/02/06 18:27:16
*************** executable file.  When @value{GDBN} find
*** 6646,6651 ****
--- 6646,6660 ----
  the entry's @code{mapped} member to determine whether the overlay is
  currently mapped.
  
+ In addition, your overlay manager may define a function called
+ @var{_ovly_debug_event}.  If this function is defined, @value{GDBN}
+ will silently set a breakpoint there.  If the overlay manager then
+ calls this function whenever it has changed the overlay table, this
+ will enable @value{GDBN} to accurately keep track of which overlays
+ are in program memory, and update any breakpoints that may be set
+ in overlays.  This will allow breakpoints to work even if the 
+ overlays are kept in ROM or other non-writable memory while they
+ are not being executed.
  
  @node Overlay Sample Program
  @section Overlay Sample Program

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