X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fsparc-tdep.c;h=ae1bf7995e4538cb6c958fe0311dbac2f03b44a4;hb=9b254dd1ce46c19dde1dde5b8d1e22e862dfacce;hp=4324bc27325620d092276d1743a3c3da3e109bbe;hpb=e6d4f032a508328be58d14fb08b323531c543c0f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 4324bc2732..ae1bf7995e 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1,6 +1,7 @@ /* Target-dependent code for SPARC. - Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 + Free Software Foundation, Inc. This file is part of GDB. @@ -271,7 +272,7 @@ static const char *sparc32_pseudo_register_names[] = /* Return the name of register REGNUM. */ static const char * -sparc32_register_name (int regnum) +sparc32_register_name (struct gdbarch *gdbarch, int regnum) { if (regnum >= 0 && regnum < SPARC32_NUM_REGS) return sparc32_register_names[regnum]; @@ -378,7 +379,7 @@ sparc32_pseudo_register_write (struct gdbarch *gdbarch, static CORE_ADDR sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, - CORE_ADDR funcaddr, int using_gcc, + CORE_ADDR funcaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, @@ -387,7 +388,7 @@ sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, *bp_addr = sp - 4; *real_pc = funcaddr; - if (using_struct_return (value_type, using_gcc)) + if (using_struct_return (value_type)) { gdb_byte buf[4]; @@ -528,7 +529,7 @@ sparc32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, location for inserting the breakpoint. */ static const gdb_byte * -sparc_breakpoint_from_pc (CORE_ADDR *pc, int *len) +sparc_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len) { static const gdb_byte break_insn[] = { 0x91, 0xd0, 0x20, 0x01 }; @@ -1354,37 +1355,6 @@ sparc_write_pc (struct regcache *regcache, CORE_ADDR pc) regcache_cooked_write_unsigned (regcache, tdep->npc_regnum, pc + 4); } -/* Unglobalize NAME. */ - -char * -sparc_stabs_unglobalize_name (char *name) -{ - /* The Sun compilers (Sun ONE Studio, Forte Developer, Sun WorkShop, - SunPRO) convert file static variables into global values, a - process known as globalization. In order to do this, the - compiler will create a unique prefix and prepend it to each file - static variable. For static variables within a function, this - globalization prefix is followed by the function name (nested - static variables within a function are supposed to generate a - warning message, and are left alone). The procedure is - documented in the Stabs Interface Manual, which is distrubuted - with the compilers, although version 4.0 of the manual seems to - be incorrect in some places, at least for SPARC. The - globalization prefix is encoded into an N_OPT stab, with the form - "G=". The globalization prefix always seems to start - with a dollar sign '$'; a dot '.' is used as a seperator. So we - simply strip everything up until the last dot. */ - - if (name[0] == '$') - { - char *p = strrchr (name, '.'); - if (p) - return p + 1; - } - - return name; -} - /* Return the appropriate register set for the core section identified by SECT_NAME and SECT_SIZE. */