This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Add a third mode to "breakpoints always-inserted", and make it the default
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 12 Aug 2008 10:23:05 +0400
- Subject: Re: Add a third mode to "breakpoints always-inserted", and make it the default
- References: <200808120034.25338.pedro@codesourcery.com>
Pedro Alves wrote:
> Non-stop mode requires that breakpoints always be inserted
> in the inferior. We currently set that with "set breakpoints always-inserted"
> prior to switching to non-stop mode with "set non-stop on".
>
> The default setting of "set breakpoints always-inserted" is "off",
> as that is how GDB has been behaving for ages.
>
> Since non-stop requires breakpoints always-in, its just cumbersome
> to have to issue more than one command to enable non-stop mode.
>
> So, this patch changes the "set breakpoints always-inserted" setting to
> be a three-state. on and off, the same as before, and a new mode,
> "follow-non-stop". In the latter mode, GDB will behave as "on", if
> we're in non-stop mode, and as "off" if we're in all-stop mode.
>
> This mode will be the default.
>
> (gdb) show non-stop
> Controlling the inferior in non-stop mode is off.
>
> We're in all-stop.
>
> (gdb) show breakpoint always-inserted
> Always inserted breakpoint mode is follow-non-stop (currently off).
>
> GDB shows that the effect is as if "off".
>
> (gdb) set non-stop on
>
> Turns non-stop on.
>
> (gdb) show breakpoint always-inserted
> Always inserted breakpoint mode is follow-non-stop (currently on).
>
> GDB shows that the effect is as if "on".
>
> (gdb) set non-stop off
>
> Back to all-stop.
>
> (gdb) set breakpoint always-inserted on
>
> Force "on". Useful for testing.
>
> (gdb) show breakpoint always-inserted
> Always inserted breakpoint mode is on.
>
> Now GDB shows that "on", independently of the non-stop mode.
>
> What do you think?
Well, this is smart, but do we need it? As I've said in earlier email, I'm no
longer sure we need one command to enable everything.
- Volodya