This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix create pending breakpoint handle extra_string issue if not parse_condition_and_thread
- From: Keith Seitz <keiths at redhat dot com>
- To: Hui Zhu <hui_zhu at mentor dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Sun, 24 Mar 2013 05:02:11 -0700
- Subject: Re: [PATCH] Fix create pending breakpoint handle extra_string issue if not parse_condition_and_thread
- References: <514E8D6C dot 2010606 at mentor dot com>
On 03/23/2013 10:21 PM, Hui Zhu wrote:
-break-insert -f -c k>0 "pendfunc1 if k == 0"
&"Function \"pendfunc1\" not defined.\n"
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="pendfunc1
if k == 0",cond="k>0",times="0",original-location="pendfunc1 if k == 0"}
IMO, this should not be permitted at all. Two reasons:
1) We could argue about which condition is correct to keep.
2) The MI specification does not say anything about permitting this type
of usage. [I would therefore argue it is illegal.]
Likewise for "thread" (and "task", but there is no task parameter for
create_breakpoint for some reason).
Ideally an error should be issued when the breakpoint is set:
-break-insert -c "argc > 1" "main if argc > 2"
^error,msg="Garbage 'if argc > 2' at end of command"
Please remember to submit a test case (or cases) with patches whenever
possible.
Keith