This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Make static tracepoint with markers more OO
- From: Tom Tromey <tromey at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 13 Jan 2012 08:36:03 -0700
- Subject: Re: [RFC] Make static tracepoint with markers more OO
- References: <m362gg9ro7.fsf@gmail.com>
>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
Sergio> I have been working on this patch, and I would like some comments from
Sergio> you guys. It basically implements new methods inside breakpoint_ops in
Sergio> order to make static tracepoint with markers (`strace -m') more OO.
I think it is very nice. Thanks.
At first I thought that maybe the overlap between the
create_sals_from_address and decode_linespec methods could be eliminated.
But, I think the first one has to compute the text that is used
when re-evaluating, but the latter just has to re-evaluate it, and so
the savings would be minimal.
My only comment on the design is that I wonder if the handling of
pending breakpoints is done at the right place. I assume we don't
support pending static tracepoint (not even sure if that can mean
anything) -- but I think we probably do want to support pending
SystemTap probe breakpoints.
Sergio> + if (arg && strncmp (arg, "-m", 2) == 0 && isblank (arg[2]))
I am not sure that isblank is ok to use. gdb doesn't use it anywhere
else. I suggest just using the original check.
Sergio> + /* This method will be responsible for creating a breakpoint given its SALs.
Sergio> + Usually, it just calls `create_breakpoints_sal' (for ordinary
Sergio> + breakpoints). However, there may be some special cases where we might
Sergio> + need to do some tweaks, e.g., see
Sergio> + `strace_marker_init_or_create_breakpoint_sal'.
This function doesn't exist :)
Tom