gdbserver loading symbol table from remote file

gdb, gdbserver

Solution

How can I ask gdb to load symbol from remote file /user/bin/foo

You can't. Copy remote `/usr/bin/foo` locally (or mount the filesystem it's on), and then invoke gdb like this: `gdb /path/to/copy/of/foo`, or just use the `file` command.

Problem

I am trying to use gdbserver... I have an application with binary path `/user/bin/foo` running with pid `19767`. Started the gdbserver on remote: ``` gdbserver --remote-debug --multi 0:12347 ``` Started gdb on client and connected it to remove server ``` target extended-remote 192.168.1.84:12347 ``` Attached gdb on pid ``` attach 19767 ``` It shows: ``` warning: Could not load vsyscall page because no executable was specified try using the "file" command first. 0x00007f207550043c in ?? () ``` Also, current thread information it is showing is incorrect. Like info threads shows 1 thread , but my app has 10 threads- ``` (gdb) info threads * 1 Thread 19767.19767 0x00007f207550043c in ?? () ``` How can I ask gdb to load symbol from remote file `/user/bin/foo`? How to make it show correct info?

Original source

Related problems