From 84bdfea6aa3c038b4e38f8615781ff3153bee2e3 Mon Sep 17 00:00:00 2001 From: Peter Schauer Date: Sat, 17 Dec 1994 10:46:32 +0000 Subject: * c-typeprint.c (c_type_print_base): Use `show' of -1 to print the return type of methods to avoid infinite loops with anonymous types. * valops.c (search_struct_field): Handle anonymous unions. * sparc-tdep.c (sunos4_skip_trampoline_code): New function to correctly handle steps into -g compiled PIC objects in the main executable. * config/sparc/tm-sun4os4.h (SKIP_TRAMPOLINE_CODE): Redefine to use sunos4_skip_trampoline_code. * dwarfread.c (DWARF_REG_TO_REGNUM): Provide a default mapping from DWARF to GDB register numbering. * dwarfread.c (locval): Use DWARF_REG_TO_REGNUM to map the register value. * config/mips/tm-mipsv4.h (DWARF_REG_TO_REGNUM): Define. --- gdb/dwarfread.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gdb/dwarfread.c') diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index aebe6bf..5afe795 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -192,6 +192,11 @@ typedef unsigned int DIE_REF; /* Reference to a DIE */ #define CHILL_PRODUCER "GNU Chill " #endif +/* Provide a default mapping from a DWARF register number to a gdb REGNUM. */ +#ifndef DWARF_REG_TO_REGNUM +#define DWARF_REG_TO_REGNUM(num) (num) +#endif + /* Flags to target_to_host() that tell whether or not the data object is expected to be signed. Used, for example, when fetching a signed integer in the target environment which is used as a signed integer @@ -2210,8 +2215,10 @@ locval (loc) break; case OP_REG: /* push register (number) */ - stack[++stacki] = target_to_host (loc, loc_value_size, - GET_UNSIGNED, current_objfile); + stack[++stacki] + = DWARF_REG_TO_REGNUM (target_to_host (loc, loc_value_size, + GET_UNSIGNED, + current_objfile)); loc += loc_value_size; isreg = 1; break; -- cgit v1.1