* GDB Debugging multiple instances of the same application and continue simultaneous
@ 2022-01-21 11:08 Nicholas Ford
2022-01-21 11:13 ` Metzger, Markus T
0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Ford @ 2022-01-21 11:08 UTC (permalink / raw)
To: gdb
Hello,
I try to debug two instances of the same application and try to make
them continue simultaneous. I used the following sequence of commands:
(gdb) set target-async on
(gdb) set non-stop on
(gdb) attach <pid1>
(gdb) set scheduler-locking off
(gdb) add-inferior
(gdb) inferior 2
(gdb) attach <pid2>
(gdb) set scheduler-locking off
(gdb) b hello-world.cpp:8
Breakpoint 1 at 0x557a557761fd: ../hello-world.cpp:8. (2 locations)
(gdb) continue
But only the process of the current inferior is continuing. I tried it
with the following configurations:
* Setting 1
o OS: Windows 10 Version 2004
o GDB: GNU gdb (GDB) 12.0.50.20220115-git
o Behavior: not even possible to switch back to inferior 1: Is it
a known issue that this is not working on Windows?
* Setting 2
o OS: Windows 10 Version 2004 using WSL (Ubuntu)
o GDB: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
o Behavior: Only the currently selected inferior is continuing
* Setting 3
o OS: Ubuntu 20.04.3 LTS
o GDB: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
o Behavior: Only the currently selected inferior is continuing
Can you please guide me if I got it wrong (regarding the feature of
running multiple processes simultaneous in GDB) or this specific feature
is not available for the given OS versions (if yes which version should
work)?
Best regards,
Nicholas Ford
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: GDB Debugging multiple instances of the same application and continue simultaneous
2022-01-21 11:08 GDB Debugging multiple instances of the same application and continue simultaneous Nicholas Ford
@ 2022-01-21 11:13 ` Metzger, Markus T
2022-01-21 13:23 ` Nicholas Ford
0 siblings, 1 reply; 3+ messages in thread
From: Metzger, Markus T @ 2022-01-21 11:13 UTC (permalink / raw)
To: Nicholas Ford, gdb
Hello Nicholas,
Have you tried "set schedule-multiple on"?
Regards,
Markus.
>-----Original Message-----
>From: Gdb <gdb-bounces+markus.t.metzger=intel.com@sourceware.org> On
>Behalf Of Nicholas Ford
>Sent: Friday, January 21, 2022 12:08 PM
>To: gdb@sourceware.org
>Subject: GDB Debugging multiple instances of the same application and continue
>simultaneous
>
>Hello,
>
>
>I try to debug two instances of the same application and try to make
>them continue simultaneous. I used the following sequence of commands:
>
>(gdb) set target-async on
>(gdb) set non-stop on
>(gdb) attach <pid1>
>(gdb) set scheduler-locking off
>(gdb) add-inferior
>(gdb) inferior 2
>(gdb) attach <pid2>
>(gdb) set scheduler-locking off
>(gdb) b hello-world.cpp:8
>Breakpoint 1 at 0x557a557761fd: ../hello-world.cpp:8. (2 locations)
>(gdb) continue
>
>But only the process of the current inferior is continuing. I tried it
>with the following configurations:
>
> * Setting 1
> o OS: Windows 10 Version 2004
> o GDB: GNU gdb (GDB) 12.0.50.20220115-git
> o Behavior: not even possible to switch back to inferior 1: Is it
> a known issue that this is not working on Windows?
> * Setting 2
> o OS: Windows 10 Version 2004 using WSL (Ubuntu)
> o GDB: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
> o Behavior: Only the currently selected inferior is continuing
> * Setting 3
> o OS: Ubuntu 20.04.3 LTS
> o GDB: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
> o Behavior: Only the currently selected inferior is continuing
>
>Can you please guide me if I got it wrong (regarding the feature of
>running multiple processes simultaneous in GDB) or this specific feature
>is not available for the given OS versions (if yes which version should
>work)?
>
>Best regards,
>Nicholas Ford
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB Debugging multiple instances of the same application and continue simultaneous
2022-01-21 11:13 ` Metzger, Markus T
@ 2022-01-21 13:23 ` Nicholas Ford
0 siblings, 0 replies; 3+ messages in thread
From: Nicholas Ford @ 2022-01-21 13:23 UTC (permalink / raw)
To: Metzger, Markus T, gdb
Hello Markus,
thanks for the fast response. With the command it works. Thanks :)
Regards,
Nicholas
Am 21.01.2022 um 12:13 schrieb Metzger, Markus T:
> Hello Nicholas,
>
> Have you tried "set schedule-multiple on"?
>
> Regards,
> Markus.
>
>> -----Original Message-----
>> From: Gdb <gdb-bounces+markus.t.metzger=intel.com@sourceware.org> On
>> Behalf Of Nicholas Ford
>> Sent: Friday, January 21, 2022 12:08 PM
>> To: gdb@sourceware.org
>> Subject: GDB Debugging multiple instances of the same application and continue
>> simultaneous
>>
>> Hello,
>>
>>
>> I try to debug two instances of the same application and try to make
>> them continue simultaneous. I used the following sequence of commands:
>>
>> (gdb) set target-async on
>> (gdb) set non-stop on
>> (gdb) attach <pid1>
>> (gdb) set scheduler-locking off
>> (gdb) add-inferior
>> (gdb) inferior 2
>> (gdb) attach <pid2>
>> (gdb) set scheduler-locking off
>> (gdb) b hello-world.cpp:8
>> Breakpoint 1 at 0x557a557761fd: ../hello-world.cpp:8. (2 locations)
>> (gdb) continue
>>
>> But only the process of the current inferior is continuing. I tried it
>> with the following configurations:
>>
>> * Setting 1
>> o OS: Windows 10 Version 2004
>> o GDB: GNU gdb (GDB) 12.0.50.20220115-git
>> o Behavior: not even possible to switch back to inferior 1: Is it
>> a known issue that this is not working on Windows?
>> * Setting 2
>> o OS: Windows 10 Version 2004 using WSL (Ubuntu)
>> o GDB: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
>> o Behavior: Only the currently selected inferior is continuing
>> * Setting 3
>> o OS: Ubuntu 20.04.3 LTS
>> o GDB: GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
>> o Behavior: Only the currently selected inferior is continuing
>>
>> Can you please guide me if I got it wrong (regarding the feature of
>> running multiple processes simultaneous in GDB) or this specific feature
>> is not available for the given OS versions (if yes which version should
>> work)?
>>
>> Best regards,
>> Nicholas Ford
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
> Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-21 13:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21 11:08 GDB Debugging multiple instances of the same application and continue simultaneous Nicholas Ford
2022-01-21 11:13 ` Metzger, Markus T
2022-01-21 13:23 ` Nicholas Ford
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).