This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Register variables in stabs
- To: gdb at sources dot redhat dot com
- Subject: Register variables in stabs
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Tue, 21 Aug 2001 01:17:14 +0200
The run-time dynamic linker (/lib/ld-linux.so.2) on my systems
contains the following seemingly bogus stab (output from objdump
--stabs):
Symnum n_type n_othr n_desc n_value n_strx String
2074 RSYM 0 1496 ffffffff 27890 buf:r(0,40)=*(0,41)=ar(0,1);0;-1;(0,2)
which means that buf is a pointer to an array of some type which lives
in register number 0xffffffff or -1. Of course -1 isn't a valid
register number, and my recent register renumbering patches for the
i386 map this bogus number onto NUM_REGS + NUM_PSEUDO_REGS, which
forces GDB to complain about the symbol. Before my change GDB would
keep the register number at -1 which resulted in no complaint. My
question now is why the register number -1 is used. Is this a
compiler bug, or has -1 a special meaning.
Depending on the answer to the question above: should we leave
negative register numbers alone (as GDB does for most other targets)
and not warn about them, or is it OK to complain?
Mark