This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/9] Put single-step breakpoints on the bp_location chain
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 30 Sep 2014 14:14:59 +0100
- Subject: Re: [PATCH 3/9] Put single-step breakpoints on the bp_location chain
- Authentication-results: sourceware.org; auth=none
- References: <1411691982-10744-1-git-send-email-palves at redhat dot com> <1411691982-10744-4-git-send-email-palves at redhat dot com> <87k34ovsc1 dot fsf at codesourcery dot com> <542AA998 dot 2090604 at redhat dot com>
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