This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Arm core files with GDB
- From: Jean-Rene Peulve <jr dot peulve at wanadoo dot fr>
- To: Ernst dot Steenbrink at imtech dot nl
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 04 May 2006 11:55:24 +0200
- Subject: Arm core files with GDB
- References: <OF6476D0AA.3CD25B77-ONC1257164.002EEE2D-C1257164.002F351F@imtechrelay.nl>
Hi,
I don't have a completed solution to extract the registers from the core
file, but the following patch allows me to access the memory chuncks
captured at the time of the crash. For example, I can do:
[jrp@dev gdb-6.4.50.20060405-arm]$ ./gdb/gdb -c /tmp/core.main
...
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf-linux".
warning: "/tmp/core.main": no core file handler recognizes format, using
default
Core was generated by `test'.
Program terminated with signal 11, Segmentation fault.
Can't fetch registers from this type of core file
Can't fetch registers from this type of core file
#0 0x00000000 in ?? ()
(gdb) info target
Local core dump file:
`/tmp/core.main', file type elf32-bigarm.
0x00024000 - 0x00029000 is load2
0x00029000 - 0x0002f000 is load3
0x40014000 - 0x40017000 is load5
0x4001b000 - 0x4001d000 is load6
0x4011d000 - 0x4012a000 is load8
0x4012a000 - 0x4012e000 is load9
0xbff7f000 - 0xc0000000 is load10
(gdb)
The following patch is when "./configure --target=arm-elf-linux" is used to
build gdb:
--- gdb/config/arm/linux.mt.orig 2006-05-04 11:37:48.295474800 +0200
+++ gdb/config/arm/linux.mt 2006-05-04 11:35:21.649768336 +0200
@@ -1,3 +1,3 @@
# Target: ARM based machine running GNU/Linux
DEPRECATED_TM_FILE= tm-linux.h
-TDEPFILES= arm-tdep.o arm-linux-tdep.o glibc-tdep.o solib.o solib-svr4.o
solib-legacy.o symfile-mem.o
+TDEPFILES= arm-tdep.o arm-linux-tdep.o glibc-tdep.o solib.o solib-svr4.o
solib-legacy.o symfile-mem.o corelow.o
The following patch is when "./configure --target=arm-elf" is used to build
gdb:
--- gdb/config/arm/embed.mt.orig 2006-05-04 11:37:35.876362792 +0200
+++ gdb/config/arm/embed.mt 2006-05-04 11:37:27.742599312 +0200
@@ -1,5 +1,5 @@
# Target: ARM embedded system
-TDEPFILES= arm-tdep.o remote-rdp.o
+TDEPFILES= arm-tdep.o remote-rdp.o corelow.o
DEPRECATED_TM_FILE= tm-embed.h
SIM_OBS = remote-sim.o
I have been forced to apply the following patch as well on the last version
of gdb I use:
--- gdb/arm-linux-tdep.c.orig 2006-05-04 11:29:44.551015136 +0200
+++ gdb/arm-linux-tdep.c 2006-05-04 11:30:30.963959296 +0200
@@ -79,8 +79,8 @@
hidden behind the regcache abstraction. */
static void
arm_linux_extract_return_value (struct type *type,
- char regbuf[],
- char *valbuf)
+ gdb_byte *regbuf,
+ gdb_byte *valbuf)
{
/* ScottB: This needs to be looked at to handle the different
floating point emulators on ARM GNU/Linux. Right now the code
At 10:35 04/05/06, Ernst.Steenbrink@imtech.nl wrote:
Hi
I saw your message on:
http://sourceware.org/ml/gdb/2006-01/msg00042.html
I was wondering if you solved the problem since I have the same problem.
Maybe you have some links/advice on how to fix this.
Kind regards,
Ernst.
Ernst Steenbrink
Imtech ICT Technical Systems
Henry Dunantstraat 38
3822 XE Amersfoort
Tel + 31 (0)33 454 33 51
Fax + 31 (0)33 454 33 35
E-mail: ernst.steenbrink@imtech.nl
Info www.imtechict.nl