public inbox for
 help / color / mirror / Atom feed
* Re: Semihosting in GDB 11.1 | Proposed patch for interrupting in sync mode
@ 2022-03-09  7:25 Adrian Oltean
  2022-03-09 19:49 ` Tom Tromey
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Oltean @ 2022-03-09  7:25 UTC (permalink / raw)
  To: Tom Tromey, Adrian Oltean via Gdb

Hi Tom,

Unfortunately, I could not find ways to adapt all the other components I have around GDB to 
work with target-async mode enabled. It is what it is...

Regarding the 'H' packet, I had a second look in the RSP specs where it's stated that '0' indicates
an arbitrary process/thread. So, as you mentioned, I changed the GDB server code to simply
ensure there's a valid thread stopped marked as 'current'. The original implementation incorrectly
assimilated '0' with 'first thread' (always).

Thank you,

-----Original Message-----
From: Tom Tromey <> 
Sent: Wednesday, March 9, 2022 12:10 AM
To: Adrian Oltean via Gdb <>
Cc: Adrian Oltean <>
Subject: [EXT] Re: Semihosting in GDB 11.1 | Proposed patch for interrupting in sync mode

Caution: EXT Email

>>>>> Adrian Oltean via Gdb <> writes:

> 1. I need to run GDB client in all-stop mode with target-async set to off.
> This seems to be a must in order to make some python scripts 
> (containing
> gdb.post_event('continue')) interact correctly with Eclipse CDT and 
> with some automation I have around the python scripts.

I think it would be better on the whole to figure out a way to make this work with target-async.  In the long run I'd prefer that gdb remove sync target wait entirely -- that the default be target-async everywhere.

> but I'd like to know if there's any chance I'll break any use case 
> with these changes.

I don't have the answer to that I'm afraid.

> Is the described behavior a known issue inside GDB? Or do I have to 
> change something in the server to correct the described behavior?

>   [remote] Sending packet: $Hg0#df

I think this request means to switch to any thread for subsequent non-continue/step requests.  So, ignoring it is almost the right thing to do, I think the idea is just to ensure that some stopped thread is selected.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-17 17:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09  7:25 Semihosting in GDB 11.1 | Proposed patch for interrupting in sync mode Adrian Oltean
2022-03-09 19:49 ` Tom Tromey
2022-03-10  9:47   ` Pedro Alves
2022-03-10 10:02     ` [EXT] " Adrian Oltean
2022-03-10 11:30       ` Pedro Alves
2022-03-10 12:32         ` Pedro Alves
2022-03-14  7:33           ` Adrian Oltean
2022-03-17 17:48             ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).