From: Pedro Alves <pedro@palves.net>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Don't pretend infcalls don't set the inferior running (PR gdb/34082)
Date: Fri, 8 May 2026 22:33:08 +0100 [thread overview]
Message-ID: <0418e1f0-a6e7-4acb-ac64-c2826f8afb79@palves.net> (raw)
In-Reply-To: <87bjeqneh5.fsf@tromey.com>
On 2026-05-08 15:49, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:
>
> Pedro> I think the right fix is to stop pretending that infcalls don't set
> Pedro> the target running. I can't think of a reason we do that. It really
> Pedro> does run. Some thoughts:
>
> This makes total sense to me, and I think it's a good direction.
> However, unfortunately this patch caused some regressions in
> compile.exp.
>
> Looking at gdb.log it seems like maybe something isn't being updated on
> an error path:
>
> compile code *(volatile int *) 0 = 0;
> The program being debugged received signal SIGSEGV, Segmentation fault
> while in a function called from GDB. GDB has restored the context
> to what it was before the call. To change this behavior use
> "set unwind-on-signal off". Evaluation of the expression containing
> the function (_gdb_expr) will be abandoned.
> (gdb) PASS: gdb.compile/compile.exp: compile code segfault second
> break 132
> Breakpoint 2 at 0x400521: file /home/tromey/gdb/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.compile/compile.c, line 132.
> (gdb) continue
> Cannot execute this command while the selected thread is running.
>
Bah, my build doesn't have libcc1 support:
PASS: gdb.compile/compile.exp: test compile code command without running inferior
PASS: gdb.compile/compile.exp: test compile command without running inferior
PASS: gdb.compile/compile.exp: test compile file command without running inferior
UNTESTED: gdb.compile/compile.exp: compile command not supported (could not find libcc1)
I'll see if I can set that up.
Also sounds like we may be missing an infcall test that exercises this case without
relying on "compile".
>
> After this point there are several such errors.
>
> I'm happy to file a bug if you'd prefer.
>
That'd be great! I might not be able to look at this until later next week. Thanks.
Pedro Alves
next prev parent reply other threads:[~2026-05-08 21:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 18:49 Pedro Alves
2026-04-24 8:49 ` Andrew Burgess
2026-04-24 15:34 ` Pedro Alves
2026-04-29 7:12 ` Andrew Burgess
2026-05-08 14:49 ` Tom Tromey
2026-05-08 21:33 ` Pedro Alves [this message]
2026-05-13 15:34 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0418e1f0-a6e7-4acb-ac64-c2826f8afb79@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox