3

I am trying to get going remote debugging using gdbserver running on a ARM target running Linux kernel version 2.6.38.8.

On this target I run a gdbserver which is a 32-bit ELF file, as below:

./gdbserver --remote-debug --attach 192.xxx.xxx.2:2345 1600

Attached; pid = 1600
Listening on port 2345

The gdb server on starting says:

This gdbserver was configured as "arm-none-linux-gnueabi"

On a Ubuntu (32 bit) machine I run the GDB client which also seems 32 bit(/usr/bin/gdb) as below to connect to the remote GDB server. On the GDB prompt I enter as below:

(gdb) **target remote 192.xxx.xxx.2:2345**

Remote debugging using 192.xxx.xxx.2:2345

**warning: Architecture rejected target-supplied description**

Below are errors I see on the GDB prompt of the client:

Remote 'g' packet reply is too long: fcfdffff901bdbbe84d00e4002000000000000000000000000000100a2000000901bdbbe0000000000a006400000000000000000f819dbbe34bd3a4044bd3a40100000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c4200b808422200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
(gdb)

After issuing this command, I see below error on target gdbserver:

Remote debugging from host 192.xxx.xxx.28

**readchar: Got EOF**

Remote side has terminated connection.  GDBserver will reopen the connection.

The client gdb says:

This GDB was configured as "**i686-linux-gnu**".

Note: Also tried running gdbserver on the target with the --target-debug option, but still it did not work, but it spitted more errors on the server upon the client trying to connect. I can put up those errors if it helps.

See the Errors.

What is the error saying?

What is the mismatch between server, client?

How can I resolve this and get it working?

10
  • 1
    I can't test this, but it would probably help to install an ARM-aware gdb on the x86 system. apt-get install gdb-arm-none-eabi will install /usr/bin/arm-none-eabi-gdb, which on my ubuntu 14.04 64-bit system reports This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi". Commented Oct 21, 2014 at 19:42
  • @MarkPlotnick Will check tomorrow and update Commented Oct 21, 2014 at 20:37
  • @MarkPlotnick - When i tried to install using apt-get install gdb-arm-none-eabi , got an error saying "Unable to locate package gdb-arm-none-eabi" . What am i missing? How do i install that gdb package? Commented Oct 22, 2014 at 9:40
  • @MarkPlotnick - I even tried building gdb 7.3 from src to configure for target=arm and it failed. Would it be possible for you to share that gdb binary for arm target you have please? Commented Oct 22, 2014 at 10:47
  • Ubuntu I have is 11.10 (32bit) system Commented Oct 22, 2014 at 11:57

1 Answer 1

1

I have managed to get a GDB server and GDB client which have worked for my 32-bit Ubuntu (client GDB) and ARM Cortex A8 target (GDB server). I got the pre-built binaries from the Linaro toolchain binaries link.

These worked perfectly!

I also tried a later version of the 4.9 toolchain, and it worked as well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.