gdbserver (arm,natty) <-> gdb (ia32,natty) fails

Bug #736354 reported by Tom Gall on 2011-03-16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)

Bug Description

Binary package hint: gdb

Attempting a remote debug session.

On the arm machine:

tgall@halimede:~$ gdbserver /bin/ls
Process /bin/ls created; pid = 15437
Listening on port 1234

Remote debugging from host
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
Listening on port 1234

On the intel machine using gdb-mutliarch

 gdb-multiarch /bin/ls
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu10) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /bin/ls...(no debugging symbols found)...done.
(gdb) target remote
Remote debugging using
warning: Architecture rejected target-supplied description
Remote 'g' packet reply is too long: 000000002959b2be00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002058b2be00000000e0070b40300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


Version info:
ia32: gdb-multiarch 7.2-1ubuntu10
armel: gdbserver 7.2-1ubuntu10

Arm box
root@halimede:~# lsb_release -rd
Description: Ubuntu Natty (development branch)
Release: 11.04

intel box
tgall@proteus:~$ lsb_release -rd
Description: Ubuntu Natty (development branch)
Release: 11.04

Ulrich Weigand (uweigand) wrote :

When you say:

"On the intel machine using gdb-mutliarch

 gdb-multiarch /bin/ls"

are you actually refering to the Intel copy of /bin/ls ?

This will cause GDB to expect to debug Intel architecture, which does not agree with an ARM architecture being reported by the remote stub.

You should use a copy of the *ARM* binary on the Intel machine when starting GDB ...

shivakumar (shivakumarpm26) wrote :

Hi this is shivakumar,
I am also getting same error
warning: Architecture rejected target-supplied description
Remote 'g' packet reply is too long: 000000

you told to use a copy of the ARM binary on the intel machin when starting GDB. Could you please tell me how to create ARM binary on Intel machine.
Thanks in advance.

Copy the binary from the ARM machine to the Intel machine directly and then refer to that (use SCP or some other remote copy program).

bhs (bharath-vegito) wrote :

Hi Matthew, Shivkumar,
I have seen this issue even when binary is copied and passed to gdb-multiarch.

Remote 'g' packet reply is too long: 000000002959b2be00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002

The root cause of the problem is we are not letting gdb-multiarch know the architecture. To solve this, simply pass in gdbinit file or via gdb shell.

'set architecture arm'

This fixes the problem mentioned in bug.

This is not a gdb-multiarch bug and this is to be expected since gdb-multiarch is general to many architectures. It assumes the user pass the architecture via commands or gdbinit file.

Changed in gdb (Ubuntu):
status: New → Invalid
bhs (bharath-vegito) wrote :

I want to mark this as not a bug as this is expected.

Please reopen if you believe it is otherwise.

bhs (bharath-vegito) wrote :

My comment #4 is not exactly, correct.

(gdb) target remote
Remote debugging using

This is expected to work correctly becuase gdbserver should pass target arch information from server side to client side.

I have seen this happens correctly when gdbserver is from Ubuntu from 12.04 to 13.10 and gdb-multiarch being Ubuntu 12.04.

From 14.04 onwards, I see the same problem reproducing again. So, a regression in gdb. Re-opening bug. This is a bug for gdbserver (updated package).

Changed in gdb (Ubuntu):
status: Invalid → Confirmed
Matthias Klose (doko) wrote :

closing this issue; please recheck with gdb in 14.04 LTS and 14.10. Feel free to re-open the issue if the problem persists.

Changed in gdb (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers