This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/7.8] user breakpoint not inserted if software-single-step at same location
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 30 May 2014 09:19:29 -0700
- Subject: Re: [RFA/7.8] user breakpoint not inserted if software-single-step at same location
- Authentication-results: sourceware.org; auth=none
- References: <1401394280-14999-1-git-send-email-brobecker at adacore dot com> <5387BFF0 dot 6010208 at redhat dot com> <20140530122253 dot GC4289 at adacore dot com> <53887ED5 dot 5050603 at redhat dot com> <20140530132659 dot GD4289 at adacore dot com> <5388AA76 dot 4070101 at redhat dot com>
> I have a very simple idea, around "jump" + "always-inserted".
>
> E.g., with, where b+ indicates a user breakpoint:
>
> 00001 nop <- PC
> b+ 00002 nop
>
> - enable breakpoints always inserted mode
> - step to 00002
> - gdb removes the sss breakpoint.
> - due to always inserted mode, gdb does not remove b+, but
> due to the bug, it's actually no longer planted.
> - the b+ breakpoint should be reported to the user.
> - now do "jump $pc".
> - expected:
> The breakpoint should trigger immediately again.
> - what we get on sss targets:
> GDB loses control, and program runs to end.
>
> Ah, I just went ahead and tried that against my by sss-on-x86
> branch, and indeed it fails here, while it passes on
> pristine mainline / hardware stepping.
That is very clever! WDYT about pushing this new testcase now?
--
Joel