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: RFA: implement ambiguous linespec proposal


Yao> Thanks to Doug, I applied your patch on GDB CVS 2011-11-10.  My comments
Yao> below,

Oops, sorry, I did not notice this before my rebase.
I will fix up my branch now.

Yao> I suggest that we add a comment, I steal from Ulrich's comment :)
Yao> 	 /* We fall back to GDBARCH if there is no architecture
Yao>  	    associated with SAL.  */

Done.

Yao> I got a compilation warning below, and looks like copy_arg should be
Yao> initialized to NULL.

Done.

>> -  /* Ranged breakpoints have only one start location and one end location.  */
>> -  gdb_assert (sals_end.nelts == 0 || (sals.nelts == 1 && sals_end.nelts == 1));
>> +  if (sals_end.nelts != 0 && (sals.nelts != 1 || sals_end.nelts != 1))
>> +    {
>> +      /* Ranged breakpoints have only one start location and one end
>> +	 location.  */
>> +      b->enable_state = bp_disabled;
>> +      update_global_location_list (1);
>> +      printf_unfiltered (_("Could not reset ranged breakpoint %d: "
>> +			   "multiple locations found\n"),
>> +			 b->number);
>> +      return;
>> +    }
>> 

Yao> I don't understand why assert is replaced by a condition check.
Yao> Could you elaborate a little?

There was a thread on gdb@ about this.

Anyway, this is a bad assert.  If breakpoint re-setting causes a ranged
breakpoint to have multiple locations -- which is possible today if you
use "file:line" breakpoints -- then gdb will crash.

On the gdb thread we agreed to disable the ranged breakpoint in this
situation.

Yao> ${hex} has been defined in dejagnu/runtest.exp, and we can simply
Yao> use it.

Thanks, fixed.

Tom


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