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/7.6] Fix wrong release (maybe crash GDB) in build_target_command_list


>>>>> "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


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