Pedro Alves wrote: > On Wednesday 17 June 2009 18:19:10, Aleksandar Ristovski wrote: > >> Here is a patch that does what you described. > > Thanks. This is still not complete, though. > > You need to make sure that the "multi_process" flag stays turned off > if the backend doesn't support MP, otherwise, things like > remote-utils.c:write_ptid will still misbehave (gdb will realize the > target doesn't support multi-process, but the remote target will > be replying with multi-process packets, how odd would that be?!). > That flag is currently bound to GDB's multi-process support, > because current gdbserver is assuming all backends support mp. > > /* Record if GDB knows about multiprocess support. */ > if (strcmp (p, "multiprocess+") == 0) > multi_process = 1; > > > To see this in action, you can connect with > "target extended-remote :foo"/"set debug remote 1", and make sure that > the packets flowing in both directions don't use multi-process thread > id extensions (e.g., 'p1.1' vs '1'). > Ok, then something like this? -- Aleksandar Ristovski QNX Software Systems * target.h (supports_multiprocess): New function. * server.c (handle_query): Use supports_multiprocess and output multiprocess accordingly. * linux-low.c (linux_supports_multiprocess): New function. (linux_target_ops): Set supports_multiprocess.