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] Fix create pending breakpoint handle extra_string issue if not parse_condition_and_thread


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


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