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


Hi Keith,

Thanks for your review.

On Sun, Mar 24, 2013 at 8:02 PM, Keith Seitz <keiths@redhat.com> wrote:
> 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"

I am sorry that what you care about is the issue that affect the mi.
But my patch is for the issue inside the function create_breakpoint.
I post the mi commands to show the issue is because it call
create_breakpoint with parse_condition_and_thread is 0 and easy to
show how it can affect the behavior of a pending breakpoint.
I think this issue also affect other functions that call
create_breakpoint with parse_condition_and_thread is 0.

So if you don't mind, please let us focus on create_breakpoint first.

And we also can do some work in:
-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.

Thanks for you mind.  I will do it later.

Best,
Hui

>
> Keith


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