Re: [PATCH/7.6] Fix wrong release (maybe crash GDB) in build_target_command_list

Hui Zhu
2013-04-24T23:16:07Z

On Wed, Apr 24, 2013 at 11:35 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
>
> Hui> I tried but looks free conditions cannot crash GDB. :(
>
> I was wondering if there could be a non-crashing reproducer.
> It seems a little tricky.
>
> I think this particular patch is ok without a test though.
> Please check it in.

Checked in http://www.sourceware.org/ml/gdb-cvs/2013-04/msg00230.html
Can I check in it to 7.6 branch?

>
>>> The "continue" seems to mean that null_command_or_parse_error will not
>>> be set in the "parse error" case.
>
> Hui> I think it is right, because even if one of breakpoint loc doesn't
> Hui> have commands. GDB still need send other commands to target.
>
> I think that would be an argument for removing the "break" -- but not
> necessarily for keeping the "continue".
>
> The "return" in the null_command_or_parse_error case also seems weird to
> me, but I didn't think hard about it.

Because current function is hard to handle two or more breakpoints in
same address with different commands and conditions. So maybe I will
rewrite this function.
Please keep help me with that when I post patch for them.

Thanks,
Hui

>
> Tom