This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb remote protocol breakpoints (Z0 command)
- From: Yao Qi <yao at codesourcery dot com>
- To: David Taylor <dtaylor at emc dot com>, <gdb at sourceware dot org>
- Date: Fri, 20 Jun 2014 13:39:41 +0800
- Subject: Re: gdb remote protocol breakpoints (Z0 command)
- Authentication-results: sourceware.org; auth=none
- References: <20417 dot 1403189074 at usendtaylorx2l>
On 06/19/2014 10:44 PM, David Taylor wrote:
> There are many things you might want to do at a breakpoint that lack
> bytecode operators. Just for starters,
>
> . there is no bytecode operator for setting memory
>
> . there is no bytecode operator for setting registers
It is fine to extend bytecode for setting memory and registers...
>
> . there is no bytecode operator for calling arbitrary functions
... but calling functions is too complex to be operated by bytecode.
Each bytecode operator just does simple/primitive operation. If we've
already had bytecode for setting memory and registers, GDB may generate
a sequence of bytecode (including setting memory and registers) to do
function call. However, I am not very sure.
>
> . there is no 'continue' option (as in: ``after performing the
> requested commands, continue the current thread'')
>
> There are other capabilities that I would like as well, but without the
> four mentioned above, I don't consider it very useful at all.
>
> Has anyone else thought about these issuses and possibly sketched out
> extensions to allow such capabilities?
>
> [The 'continue' command would likely be an extension to the Z0 command,
> the others would likely be extensions to the bytecode language.]
We have a kind of breakpoint, dprintf, which is a breakpoint plus
printing and a 'continue' command at the end. It has some flaws, but
closed to your needs.
If you don't require much interactive operations, tracepoint is a better
choice, IMO.
--
Yao (éå)