From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: gdb@sources.redhat.com Subject: Register variables in stabs Date: Mon, 20 Aug 2001 16:17:00 -0000 Message-id: <200108202317.f7KNHEK00977@delius.kettenis.local> X-SW-Source: 2001-08/msg00158.html 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