This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb remote protocol breakpoints (Z0 command)
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: David Taylor <dtaylor at emc dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Mon, 23 Jun 2014 20:52:56 -0400
- Subject: Re: gdb remote protocol breakpoints (Z0 command)
- Authentication-results: sourceware.org; auth=none
- References: <20417 dot 1403189074 at usendtaylorx2l> <53A3C91D dot 7010304 at codesourcery dot com> <2184 dot 1403531084 at usendtaylorx2l>
dtaylor wrote:
> [...]
> Both our old and our new stubs support tracepoints; our use of
> tracepoints preceeds GDB support for tracepoints.
I think I remember those early days.
> I've used it for things like setting a breakpoint on a
> troublesome functions and then creating a command list like --
>
> print that the function was called and its arguments; for
> structures, possibly print key elements of the structure
> [...]
> print a backtrace
> [...]
> set $retval = <current function>(<current arguments>)
> [...]
Uploading enough intelligence & information into the gdbstub
to perform inferior function calls, or especially backtraces,
is going to be a tough hill to climb.
> re-enable breakpoint
>
> So, we end up with the function arguments, the return value, and
> selected other interesting information each time the function is called.
(Hey, you guys need to try out systemtap. :-)
- FChE