This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/7.6] Fix wrong release (maybe crash GDB) in build_target_command_list
- From: Tom Tromey <tromey at redhat dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>, Joel Brobecker <brobecker at adacore dot com>
- Date: Wed, 24 Apr 2013 08:30:56 -0600
- Subject: Re: [PATCH/7.6] Fix wrong release (maybe crash GDB) in build_target_command_list
- References: <CANFwon0RCwi1CQepWnZuuPvXUNVHXJU-UbknXaR_U3h8shUc8g at mail dot gmail dot com>
>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
Hui> 2013-04-24 Hui Zhu <hui@codesourcery.com>
Hui> * breakpoint.c (build_target_command_list): Change loc->cond_bytecode
Hui> to loc->cmd_bytecode.
Is it possible to make a test case for this?
The patch looks good.
I am curious about this code in build_target_command_list:
aexpr = parse_cmd_to_aexpr (bl->address,
loc->owner->extra_string);
loc->cmd_bytecode = aexpr;
if (!aexpr)
continue;
The "continue" seems to mean that null_command_or_parse_error will not
be set in the "parse error" case.
Also, parse_cmd_to_aexpr calls 'error' in a few spots but then in
another spot is careful not to. This seems somewhat odd.
Tom