gdb remote debugging how to load symbols from remote


This Content is from Stack Overflow. Question asked by Necktwi

On remote target machine I’m starting gdbserver to debug a binary /usr/local/bin/my_test_bin_gdb3 compiled with -ggdb3.

$ gdbserver --multi :1111

On host machine I got only source files, no debug symbols or binaries. I’m using gdb

$ cd <project-source-root>
$ gdb
(gdb) target extended-remote <remote-ip>:1111
Remote debugging using <remote-ip>:1111
(gdb) set remote exec-file /usr/local/bin/my_test_bin_gdb3
(gdb) start <options to my_test_bin_gdb3>
No symbol table loaded.  Use the "file" command.
(gdb) file /usr/local/bin/my_test_bin_gdb3
/usr/local/bin/my_test_bin_gdb3: No such file or directory.

How to load symbols from remote binary. I can’t copy the binary and all the linked libs to host as they are huge. can’t gdb load symbols from target on fly?


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?