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 3/9] Put single-step breakpoints on the bp_location chain


On 09/30/2014 02:01 PM, Pedro Alves wrote:
> On 09/28/2014 01:32 PM, Yao Qi wrote:
>> Pedro Alves <palves@redhat.com> writes:
>>
>>> @@ -15496,22 +15466,9 @@ single_step_breakpoints_inserted (void)
>>>  void
>>>  remove_single_step_breakpoints (void)
>>>  {
>>> -  gdb_assert (single_step_breakpoints[0] != NULL);
>>> +  gdb_assert (single_step_breakpoints != NULL);
>>>  
>>> -  /* See insert_single_step_breakpoint for more about this deprecated
>>> -     call.  */
>>> -  deprecated_remove_raw_breakpoint (single_step_gdbarch[0],
>>> -				    single_step_breakpoints[0]);
>>> -  single_step_gdbarch[0] = NULL;
>>> -  single_step_breakpoints[0] = NULL;
>>> -
>>> -  if (single_step_breakpoints[1] != NULL)
>>> -    {
>>> -      deprecated_remove_raw_breakpoint (single_step_gdbarch[1],
>>> -					single_step_breakpoints[1]);
>>> -      single_step_gdbarch[1] = NULL;
>>> -      single_step_breakpoints[1] = NULL;
>>> -    }
>>> +  delete_breakpoint (single_step_breakpoints);
>>
>> We need to set single_step_breakpoints back to NULL.  This causes many
>> fails for arm-linux-gnueabi target, as I tested.
> 
> Thanks Yao.
> 
> I'll try to figure out why I didn't see that in my testing...

Ah, I failed to test this revision of the patch alone on top of
the sss-on-x86 series.  A later patch in the series removes this
function, and instead deletes the sss breakpoint through this:

/* Delete the breakpoint pointed at by BP_P, if there's one.  */

static void
delete_thread_breakpoint (struct breakpoint **bp_p)
{
  if (*bp_p != NULL)
    {
      delete_breakpoint (*bp_p);
      *bp_p = NULL;
    }
}

which clears the pointer.

I'll rebase this on top of the x86-on-sss series instead of
the other way around, and re-test it.  It's a pain, but
it'll be my penance...

Thanks,
Pedro Alves


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