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 bug 15433 - GDB crashes when using agent dprintf, %s format, and an in-line string


Hi Tom,

Thanks for your review.

On Tue, May 14, 2013 at 12:35 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
>
> Hui> +        if (aexpr == NULL)
> Hui> +          error (_("Agent is not support commands of breakpoint %d."),
> Hui> +                 bl->owner->number);
>
> In addition to what Yao said, this change seems roughly equivalent to
> simply removing the TRY_CATCH from parse_cmd_to_aexpr.  (You'd have to
> clear loc->cmd_bytecode first, but it seems to me that this has to be
> done anyway, because parse_cmd_to_aexpr can already call error...)

Agree with you.  Updated patches for it.

>
> I also still don't understand the code to set null_command_or_parse_error.
> Maybe you explained it to me last time, but I forget.  If it is actually
> correct as-is, I would appreciate a comment explaining it.

I posted some introduction about it in
http://sourceware.org/ml/gdb-patches/2013-05/msg00425.html .  I hope
it will be helpful to you to understand this function.
And I suggest we can discussion this function in thread
http://sourceware.org/ml/gdb-patches/2013-04/msg00839.html ([PATCH/v2]
fix Bug 15180 Agent style dprintf does not respect conditions, I will
ping it later) that I did a lot of change about this function.

Thanks,
Hui

2013-05-14  Hui Zhu  <hui@codesourcery.com>

	PR gdb/15433
	* breakpoint.c (parse_cmd_to_aexpr): Remove TRY_CATCH for gen_printf.

2013-05-14  Hui Zhu  <hui@codesourcery.com>

	PR gdb/15433
	* gdb.base/dprintf.exp: Test unsupport commands on target.

Attachment: dprintf-cmd-not-support.txt
Description: Text document

Attachment: dprintf-cmd-not-support-test.txt
Description: Text document


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