Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gdb - generate-core-file for remote target?

I'm debugging with the Codesourcery version of gdb for ARM (i.e. arm-none-eabi-gdb) and attempting to generate a corefile for later inspection. OpenOCD is my GDB target. All gdb tells me when I run 'gcore' or 'generate-core-file' is "Can't create corefile". Any suggestions? In general is it possible to do a core dump with a remote target?

like image 501
Brian McFarland Avatar asked Nov 29 '11 19:11

Brian McFarland


1 Answers

It doesn't seem possible yet, but there is some promising discussion on the GDB mailing list here and here. As an alternative maybe you could try the following?

dump memory filename.bin start_addr end_addr
restore filename.bin binary start_addr

where you fill in start_addr and end_addr appropriately. You'd have to save registers by hand.

like image 94
Will Avatar answered Nov 02 '22 03:11

Will