I have a C++ application running on an embedded platform arm7hf arch. The binary has its symbols stripped by using objcopy (man page steps for objcopy flag --only-keep-debug 3 steps). The stripped symbols are saved in a x.debug file.
I have the cross compiled application running on my embedded system. While logged into the embedded system, I can run gdb and load the stripped symbols with the gdb> symbol-file ./path/to/x.debug
then when I break everything looks great! So I conformed that the symbols are correct and can be used by gdb to debug.
What I really want to do is remotely debug using gdbserver and gdb-multiarch. I run gdbserver --attach $(pidof ProcName)
on the embedded system and on Ubuntu 14.04 LTS I run gdb-multiarch ./path/to/arm7hf/ProcName
.
I've tried using the flag to gdb-multiarch -symbols=./path/to/x.debug
and I've tried doing the gdb command gdb> symbol-file ./path/to/x.debug
to no vail. When I try to break or bt I get error Cannot access memory at address 0x1
. After some research that error seems to mean gdb has no symbol information.
Can someone give guidance to what I am doing wrong on the client-side (ubuntu gdb-multiarch)