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.


> 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


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