This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch][python] Add breakpoint support.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>, Phil Muldoon <pmuldoon at redhat dot com>, Tom Tromey <tromey at redhat dot com>, Eli Zaretskii <eliz at gnu dot org>
- Date: Thu, 8 Apr 2010 23:21:01 +0100
- Subject: Re: [patch][python] Add breakpoint support.
- References: <4BB0B063.6000600@redhat.com> <4BBE4A34.3020301@redhat.com> <20100408214455.GM19194@adacore.com>
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