From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Earnshaw To: Fernando Nasser Cc: rearnsha@arm.com Subject: Re: ARM/linux gdb stops and gives no info Date: Tue, 30 May 2000 10:02:00 -0000 Message-id: <200005301700.SAA05790@cam-mail2.cambridge.arm.com> References: <3933C65A.CB1626B1@cygnus.com> X-SW-Source: 2000-05/msg00164.html > > > > I can understand not being able to unpick the stack frame if I've jumped > > > > to never-never land, but to not even be able to display the registers > > > > makes the debugger useless. [...] > Peter Schauer added the test for NULL frames in there back in 1995. I believe > it was causing core dumps, but I am not sure as the ChangeLog entry does not give > the motive (we nowadays make sure it does, but that was not always true at the time): > > * infcmd.c (registers_info): Error out if selected_frame is NULL. > > I believe the default gdb routine (if the target does not define DO_REGISTERS_INFO) > does not depend on selected_frame but I can't be sure about all targets. > > I quickly created the patch below. I have no time to test it these days. > If you care applying it to your sources and trying I would appreciate. > Otherwise it goes in my 25 pages long TODO list.. ;-) Sadly, gdb won't even compile at the moment. gcc -c -g -O2 -I. -I/net/home/rearnsha/gnusrc/utils/gdb -I/net/home/rearnsha/gnusrc/utils/gdb/config -DHAVE_CONFIG_H -I/net/home/rearnsha/gnusrc/utils/gdb/../include/opcode -I/net/home/rearnsha/gnusrc/utils/gdb/../readline/.. -I../bfd -I/net/home/rearnsha/gnusrc/utils/gdb/../bfd -I/net/home/rearnsha/gnusrc/u tils/gdb/../include -I../intl -I/net/home/rearnsha/gnusrc/utils/gdb/../intl -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized /net/home/rearnsha/gnusrc/utils/gdb/core-r egset.c In file included from /net/home/rearnsha/gnusrc/utils/gdb/config/tm-linux.h :36, from tm.h:27, from /net/home/rearnsha/gnusrc/utils/gdb/defs.h:719, from /net/home/rearnsha/gnusrc/utils/gdb/core-regset.c:36: /net/home/rearnsha/gnusrc/utils/gdb/config/tm-sysv4.h:30: warning: `IN_SOLIB_CALL_TRAMPOLINE' redefined /net/home/rearnsha/gnusrc/utils/gdb/config/arm/tm-arm.h:517: warning: this is the location of the previous definition /net/home/rearnsha/gnusrc/utils/gdb/config/tm-sysv4.h:36: warning: `SKIP_TRAMPOLINE_CODE' redefined /net/home/rearnsha/gnusrc/utils/gdb/config/arm/tm-arm.h:518: warning: this is the location of the previous definition In file included from /net/home/rearnsha/gnusrc/utils/gdb/core-regset.c:52: /net/home/rearnsha/gnusrc/utils/gdb/gregset.h:29: parse error before `gdb_gregset_t' gdb/config/nm-linux.h contains the defines #define GDB_GREGSET_T elf_gregset_t #define GDB_FPREGSET_T elf_fpregset_t But elf_gregset_t is defined in linux/elfcore.h, and nothing includes that file :-) My machine is armv4l-unknown-linux-gnuoldld if that makes any differnce. R. Scott, /usr/include/sys/procfs.h contains an include of sys/elf.h, but this file doesn't exist. Should it be the same as /usr/include/elf.h?