1 year ago

#75645

test-img

Toroid

GDB: After attach to process and add inferior can't switch back to inferior 1

I have two processes which one inferior each. After I attached with the second inferior I can't switch back to the first one. Why is that not working in this case?

(gdb) attach 1348
Attaching to process 1348
[New Thread 1348.0x2104]
[New Thread 1348.0x2d44]
[New Thread 1348.0x10fc]
[New Thread 1348.0x1efc]
Reading symbols from C:\GIT\hello-world.exe...
warning: Can not parse XML library list; XML support was disabled at compile time
(gdb) add-inferior
[New inferior 2]
Added inferior 2 on connection 1 (native)
(gdb) inferior 2
[Switching to inferior 2 [<null>] (<noexec>)]
(gdb) attach 16144
Attaching to process 16144
[New Thread 16144.0x4480]
[New Thread 16144.0xa8c]
[New Thread 16144.0x3900]
[New Thread 16144.0x20d8]
Reading symbols from C:\GIT\hello-world.exe...
(gdb) info inferiors
  Num  Description       Connection           Executable
  1    process 1348      1 (native)           C:\GIT\hello-world.exe
* 2    process 16144     1 (native)           C:\GIT\hello-world.exe
(gdb) inferior 1
Inferior has no threads.
(gdb)

multithreading

gdb

0 Answers

Your Answer

Accepted video resources