Hello.
I am trying to use gdb-multiarch to remotely debug C++ code on an ARM system. When I use gdb-multiarch in the terminal, everything works fine. However, when I try to do the same thing using Eclipse, I encounter a segmentation fault.
Here is the output I get when I use gdb-multiarch in the terminal:
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
...
(gdb) set architecture arm
The target architecture is set to "arm".
(gdb) target remote 10.XX.XX.51:12345
Remote debugging using 10.XX.XX.51:12345
...
0xb6f89980 in _start () from target:/lib/ld-linux-armhf.so.3
(gdb) continue
Continuing.
...
[Inferior 1 (process 517) exited normally]
(gdb)
However, when I use Eclipse, I get the following output:
New UI allocated
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
...
(gdb) 0xb6f36980 in _start () from target:/lib/ld-linux-armhf.so.3
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb)
(gdb) continue
Continuing.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)
In Eclipse, I have the following settings under Run -> Debug Configurations... -> GDB Hardware Debugging:
- Project: DBus_AutomaticTestInterface
- C/C++ Application: /home/dbo/workspace_1/dbus_automatictestinterface/DBus_AutomaticTestInterface/Debug/DBus_AutomaticTestInterface
- Build Configuration: Use Active
- GDB Command: gdb-multiarch
- Debug server: Generic TCP/IP
- Protocol: remote
- Connection: 10:XX:XX.51:12345
On the ARM system, gdbserver is started with the following command:
gdbserver :12345 DBus_AutomaticTestInterface
Why am I encountering a segmentation fault when using Eclipse, and how can I resolve this issue?