[patch][python] Add breakpoint support.

Joel Brobecker brobecker@adacore.com
Thu Apr 8 23:26:00 GMT 2010


> 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.

I almost did implement things that way, and it's certainly better
than nothing. Maybe I'm letting best be the enemy of good, but there
are issues with a pure CLI script approach that a user cannot control.
For instance, what if one of the breakpoints now fails? A CLI script
would abort early, leaving some of the breakpoints not restored.
If some of the breakpoints were in DSOs that only get loaded at runtime,
should they be created as pending? I can't remember what the default
is when from_tty is not set...  I like the python approach because it
allows us to provide a more configurable approach than a pure CLI script
would give us.

-- 
Joel



More information about the Gdb-patches mailing list