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

New command to save breakpoints?


Hello,

some of our customers have asked us to enhance the debugger to be able
to save breakpoints in a file, in order to reset them later. We feel
it's a useful functionality to have and share with the rest of the
GDB community.

Within AdaCore, we have adopted the interface that Apple has implemented
in their own version of the debugger. So they added a command called
"save-breakpoint" which will generate a set of GDB commands re-creating
each breakpoint. To reset the breakpoints, one just "source"s this
file.

I personally like the simplicity of this approach. There are a few
issues we need to discuss, however:

  . What happens if one of the breakpoints is inside a shared library
    and that the symbols for the library haven't been loaded yet?
    The current result depends on the "breakpoint pending" setting.

  . What happens if one of the breakpoints locations is OBE and
    leads to an error? Again, depending on the "breakpoint pending"
    setting, the script will either set a pending breakpoint, ignore
    silently, or abort.

What do others think of this approach? If we can agree on it, I will
work on the implementation, probably drawing most of the code from
the last Apple source drop.

Thanks,
-- 
Joel


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