Opened 13 years ago

Closed 7 years ago

#30970 closed defect (fixed)

arm-none-eabi-gdb: remote 'g' packet reply is too long

Reported by: ben.m.cochran@… Owned by: snc@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: Cc:
Port: arm-none-eabi-gdb openocd

Description

I've installed the MacPorts version of the GNU ARM Toolchain (arm-none-eabi-gcc and arm-none-eabi-gdb) and am running into a problem with the GDB debugger.

I'm taking a class where we use the Stellaris LM3S8962 evaluation board (Cortex-M3) and a fellow classmate has installed via compiling arm-none-eabi-* using CodeSourcery Lite and GDB works fine.

I chronicled my adventure in a StackOverflow posting, the main issue I am having is in the "UPDATES" and "UPDATES 2" section of my question here: http://stackoverflow.com/questions/7053067/arm-none-eabi-gdb-and-openocd-malformed-response-to-offset-query-qoffsets

Essentially, when I connect to the remote GDB target (openocd) GDB claims after presenting a compiled .axf file:

(gdb) target remote localhost:3333
Remote debugging using localhost:3333
Remote 'g' packet reply is too long:     
0080004000000000040000220f0000002833405451332abc009600a4d2b86092c0c11
8c03040d6f0284dbb93204b40c2000000000c010020ffffffff5504
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000020000001

Searching the internet, it seems to suggest that gdb is not interpreting the ARM architecture correctly. However, none of the prescribed workarounds (setting architecture manually, or delaying the symbol file loading) holds.

Compiling with arm-none-eabi-gcc and uploading to the target with openocd works flawlessly. I am in the process of trying to compile the CodeSourcery Lite toolchain but am having dependency issues because most of my compiler tools live in MacPorts.

Do you think this is a problem with the port itself? Seems strange that another toolchain (with the same ABI) and the same OpenOCD works fine...

Attachments (1)

openocd_gpacket_bug_patch.diff (1.3 KB) - added by stuartwesterman (Stuart Westerman) 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to stuartwesterman@…

comment:2 Changed 10 years ago by ben.m.cochran@…

The referenced StackOverflow question's accepted answer contains a patch to the generally accepted root-cause/solution for the issue...

Changed 10 years ago by stuartwesterman (Stuart Westerman)

comment:3 Changed 10 years ago by stuartwesterman (Stuart Westerman)

I've attached the patch from stackoverflow. I'll look into this as the weekend nears.

comment:4 Changed 8 years ago by mf2k (Frank Schima)

Owner: stuartwesterman deleted
Status: newassigned

comment:5 Changed 7 years ago by raimue (Rainer Müller)

Owner: set to snc@…
Port: openocd added

I assume this was a bug in OpenOCD. Might be fixed already, plenty of pointers with that message when searching the web.

comment:6 Changed 7 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

Looks that way from the upstream changesets.

Note: See TracTickets for help on using tickets.