Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] mips gdbarch-ify REGISTER_NAMES, SKIP_TRAMPOLINE_CODE...
@ 2002-08-20 15:46 Michael Snyder
  2002-08-20 17:27 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2002-08-20 15:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: cagney


Only tm-mips.h seems to define REGISTER_NAME, so this should be safe.

2002-08-20  Michael Snyder  <msnyder@redhat.com>

	* mips-tdep.c (mips_skip_stub, mips_in_call_stub): Make static.
	(mips_gdbarch_init): Set skip_trampoline_code, 
	in_solib_call_trampoline.
	* config/mips/tm-mips.h (REGISTER_NAME): Delete.
	(IN_SOLIB_CALL_TRAMPOLINE, SKIP_TRAMPOLINE_CODE): Delete.

Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.113
diff -c -3 -p -r1.113 mips-tdep.c
*** mips-tdep.c	20 Aug 2002 21:58:44 -0000	1.113
--- mips-tdep.c	20 Aug 2002 22:41:27 -0000
*************** mips_breakpoint_from_pc (CORE_ADDR * pcp
*** 5218,5224 ****
     This function implements the SKIP_TRAMPOLINE_CODE macro.
   */
  
! CORE_ADDR
  mips_skip_stub (CORE_ADDR pc)
  {
    char *name;
--- 5227,5233 ----
     This function implements the SKIP_TRAMPOLINE_CODE macro.
   */
  
! static CORE_ADDR
  mips_skip_stub (CORE_ADDR pc)
  {
    char *name;
*************** mips_skip_stub (CORE_ADDR pc)
*** 5301,5307 ****
  /* Return non-zero if the PC is inside a call thunk (aka stub or trampoline).
     This implements the IN_SOLIB_CALL_TRAMPOLINE macro.  */
  
! int
  mips_in_call_stub (CORE_ADDR pc, char *name)
  {
    CORE_ADDR start_addr;
--- 5310,5316 ----
  /* Return non-zero if the PC is inside a call thunk (aka stub or trampoline).
     This implements the IN_SOLIB_CALL_TRAMPOLINE macro.  */
  
! static int
  mips_in_call_stub (CORE_ADDR pc, char *name)
  {
    CORE_ADDR start_addr;
*************** mips_gdbarch_init (struct gdbarch_info i
*** 5998,6003 ****
--- 6007,6018 ----
    set_gdbarch_store_struct_return (gdbarch, mips_store_struct_return);
    set_gdbarch_extract_struct_value_address (gdbarch, 
  					    mips_extract_struct_value_address);
+   
+   set_gdbarch_skip_trampoline_code (gdbarch, mips_skip_stub);
+ 
+   set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
+   /* set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_return_stub); */
+ 
    return gdbarch;
  }
  
Index: config/mips/tm-mips.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v
retrieving revision 1.39
diff -c -3 -p -r1.39 tm-mips.h
*** config/mips/tm-mips.h	20 Aug 2002 21:58:44 -0000	1.39
--- config/mips/tm-mips.h	20 Aug 2002 22:41:27 -0000
*************** extern int mips_step_skips_delay (CORE_A
*** 77,87 ****
  #define NUM_REGS 90
  #endif
  
- /* Given the register index, return the name of the corresponding
-    register. */
- extern const char *mips_register_name (int regnr);
- #define REGISTER_NAME(i) mips_register_name (i)
- 
  /* Initializer for an array of names of registers.
     There should be NUM_REGS strings in this initializer.  */
  
--- 77,82 ----
*************** extern void fixup_sigtramp (void);
*** 223,231 ****
  extern char *mips_read_processor_type (void);
  
  /* Functions for dealing with MIPS16 call and return stubs.  */
- #define IN_SOLIB_CALL_TRAMPOLINE(pc, name)	mips_in_call_stub (pc, name)
  #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name)	mips_in_return_stub (pc, name)
- #define SKIP_TRAMPOLINE_CODE(pc)		mips_skip_stub (pc)
  #define IGNORE_HELPER_CALL(pc)			mips_ignore_helper (pc)
  extern int mips_in_call_stub (CORE_ADDR pc, char *name);
  extern int mips_in_return_stub (CORE_ADDR pc, char *name);
--- 218,224 ----


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-21  1:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-20 15:46 [PATCH] mips gdbarch-ify REGISTER_NAMES, SKIP_TRAMPOLINE_CODE Michael Snyder
2002-08-20 17:27 ` Andrew Cagney
2002-08-20 18:12   ` Michael Snyder
2002-08-20 18:55     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox