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

Re: [patch][python] Add breakpoint support.


On Thursday 08 April 2010 22:44:55, Joel Brobecker wrote:

> This is indeed a general issue that is worth looking at.  But for the
> specific case of breakpoint saving/restoring, can we just add a couple
> of methods to the breakpoints class? The downside is that the code
> has to be written in C, I guess, as opposed to python. Hmmm, we want
> the glue code to be as minimal, right?

I'd just like to point out that we already have code in the tree (and
for a decade) that dumps tracepoints into a file; the file can be
sourced as a cli script afterwards.  See breakpoint.c:tracepoint_save_command.
Since the tracepoint/breakpoints merge, it is trivial to extend that function
to dump breakpoints as well.

(gdb) help save-tracepoints
Save current tracepoint definitions as a script.
Use the 'source' command in another debug session to restore them.

-- 
Pedro Alves


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