Re: [PATCH v2] Add autoload-breakpoints [6/6] autoload-breakpoints doc

Hui Zhu
2012-04-19T23:41:09Z

On 04/19/12 23:26, Eli Zaretskii wrote:
>> Date: Thu, 19 Apr 2012 20:31:31 +0800
>> From: Hui Zhu<hui_zhu@mentor.com>
>> CC:<gdb-patches@sourceware.org>
>>
>>>> +@item @var{id}@samp{:}@samp{R}
>>>> +This is the remove packet.
>>>> +@var{id} is the number of the autoload-breakpoint that this command
>>>> +wants to remove, encoded as a hex string.
>>>> +@value{GDBN} will remove this breakpoint as it have been removed in
>>>> +the target.
>>>
>>> I don't understand the last sentence. Please explain.
>>>
>>>> So when the target remove the breakpoint, it need remove
>>>> +this breakpoint with itself. ^^^^^^ ^^^^^^^^^^^
>>> ^^^^^^^^^^^
>>> "removes", "needs to remove", and "by itself".
>>>
>>> By the way, what non-trivial information does this sentence convey?
>>> It seems to say "when the target removes the breakpoint, it needs to
>>> remove the breakpoint", which is trivial. What am I missing here?
>>
>> This part is not very clear. What about following part?
>>
>> When @value{GDBN} get this packet, it will delete this breakpoint
>> as it have been removed in the target. So when the target send
>> this packet, it needs to remove these breakpoints in local part by itself.
>
> Who is sending this packet, the target or GDB? I understand that the
> target sends it, because you say "when GDB gets this packet".
>
Yes, the target send it.

> But if the target sends this packet, then it should be quite clear
> that it (the target) should delete the breakpoint.

In prev version, GDB will send delete cmd to target when it got a
autoload-breakpoint R to delete them. But I thought it will be hard to
handle in both for target and GDB.
So I change it: GDB will not send delete cmd after get the
autoload-breakpoints R packet, the target will remove them by itself.

In fact, I would
> expect the packet to be a side effect of deletion on the target side.
> Is the above correct?

Yes.

Thanks,
Hui