This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb.execute(to_string=True) doesn't capture signal notice anymore
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: gdb at sourceware dot org, autkin at undo dot io
- Date: Thu, 16 Aug 2018 15:35:25 +0100
- Subject: Re: gdb.execute(to_string=True) doesn't capture signal notice anymore
- References: <20180815200855.GA24829@undo-autkin>
On 15/08/18 21:08, Andrey Utkin wrote:
> Hi,
>
> We have some code which uses the fact of GDB 7.7 behaviour that if you
> execute python code like
>
> s = gdb.execute("run", to_string=True)
>
> and, say, debuggee generates SIGTRAP, then result `s` includes the
> string "Program received signal SIGTRAP, Trace/breakpoint trap."
>
> What we see is that since 7.12.1 or earlier, and until now, this is no
> longer the case - this message is not captured but is only printed to
> terminal.
>
> Before I dig into "fixing it", I want to know maintainers opinion - is
> the current behaviour exactly what you like, or it's an unintended
> regression and you'd prefer to preserve the old way?
>
This is a unintended regression unfortunately. The output of
gdb.execute has been bitten by some ui-out reorganizing.
https://sourceware.org/bugzilla/show_bug.cgi?id=21506
Cheers
Phil