0

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)

Erock 634
  • 591
  • 3
  • 18
  • `gdbserver --attach PID` is not a complete command. Please show how you *actually* run `gdbserver`, and how you connect `gdb` to it. – Employed Russian Sep 11 '16 at 01:08
  • gdbserver --attach 0.0.0.0:6806 I got assistance. Required doing: `set sysroot /path/to/toolchain/so/libs` – Erock 634 Sep 12 '16 at 19:45

0 Answers0