2000-12-08 Michael Snyder <msnyder@mvstp600e.cygnus.com>
+ * dwarf2read.c (DWARF2_REG_TO_REGNUM): New macro. Provide default
+ definition. Will be used to translate between the compiler's
+ register numbering and GDB's (for register variables etc).
+ (new_symbol): Use DWARF2_REG_TO_REGNUM to translate register ids.
* alpha-tdep.c: Fix typo in comment.
* dbxread.c: Fix typo in comment.
* fr30-tdep.c: Fix typo: newline missing after comment.
#include "gdb_string.h"
#include <sys/types.h>
+#ifndef DWARF2_REG_TO_REGNUM
+#define DWARF2_REG_TO_REGNUM(REG) (REG)
+#endif
+
#if 0
/* .debug_info header for a compilation unit
Because of alignment constraints, this structure has padding and cannot
else if (isreg)
{
SYMBOL_CLASS (sym) = LOC_REGISTER;
+ SYMBOL_VALUE (sym) =
+ DWARF2_REG_TO_REGNUM (SYMBOL_VALUE (sym));
}
else if (offreg)
{
SYMBOL_CLASS (sym) = LOC_BASEREG;
- SYMBOL_BASEREG (sym) = basereg;
+ SYMBOL_BASEREG (sym) = DWARF2_REG_TO_REGNUM (basereg);
}
else if (islocal)
{
if (isreg)
{
SYMBOL_CLASS (sym) = LOC_REGPARM;
+ SYMBOL_VALUE (sym) =
+ DWARF2_REG_TO_REGNUM (SYMBOL_VALUE (sym));
}
else if (offreg)
{
else
{
SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
- SYMBOL_BASEREG (sym) = basereg;
+ SYMBOL_BASEREG (sym) = DWARF2_REG_TO_REGNUM (basereg);
}
}
else