This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] gdbarch.sh: add IN_SOLIB_RETURN_TRAMPOLINE


This is a macro used by mips, hppa, and rs6000.  It was a fairly
straightforward addition to gdbarch.sh -- I just copied what was
in there for IN_SOLIB_CALL_TRAMPOLINE.

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

	* gdbarch.sh (IN_SOLIB_RETURN_TRAMPOLINE): Add.
	* gdbarch.c, gdbarch.h: Regenerate.
	* arch-utils.c, arch-utils.h (generic_in_solib_return_trampoline):
	Add.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.155
diff -p -r1.155 gdbarch.sh
*** gdbarch.sh	16 Aug 2002 00:27:45 -0000	1.155
--- gdbarch.sh	20 Aug 2002 22:24:48 -0000
*************** f:2:SMASH_TEXT_ADDRESS:CORE_ADDR:smash_t
*** 600,609 ****
  F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p::0:0
  f:2:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, disassemble_info *info:vma, info:::legacy_print_insn::0
  f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
  # For SVR4 shared libraries, each call goes through a small piece of
  # trampoline code in the ".plt" section.  IN_SOLIB_CALL_TRAMPOLINE evaluates
! # to nonzero if we are current stopped in one of these.
  f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_solib_call_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_call_trampoline::0
  # Sigtramp is a routine that the kernel calls (which then calls the
  # signal handler).  On most machines it is a library routine that is
  # linked into the executable.
--- 600,615 ----
  F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p::0:0
  f:2:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, disassemble_info *info:vma, info:::legacy_print_insn::0
  f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
+ 
+ 
  # For SVR4 shared libraries, each call goes through a small piece of
  # trampoline code in the ".plt" section.  IN_SOLIB_CALL_TRAMPOLINE evaluates
! # to nonzero if we are currently stopped in one of these.
  f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_solib_call_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_call_trampoline::0
+ 
+ # Some systems also have trampoline code for returning from shared libs.
+ f:2:IN_SOLIB_RETURN_TRAMPOLINE:int:in_solib_return_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_return_trampoline::0
+ 
  # Sigtramp is a routine that the kernel calls (which then calls the
  # signal handler).  On most machines it is a library routine that is
  # linked into the executable.
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.65
diff -p -r1.65 arch-utils.c
*** arch-utils.c	15 Aug 2002 23:41:20 -0000	1.65
--- arch-utils.c	20 Aug 2002 22:24:48 -0000
*************** generic_in_solib_call_trampoline (CORE_A
*** 142,147 ****
--- 142,153 ----
  }
  
  int
+ generic_in_solib_return_trampoline (CORE_ADDR pc, char *name)
+ {
+   return 0;
+ }
+ 
+ int
  generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
  {
    return 0;
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.39
diff -p -r1.39 arch-utils.h
*** arch-utils.h	15 Aug 2002 23:41:20 -0000	1.39
--- arch-utils.h	20 Aug 2002 22:24:48 -0000
*************** extern CORE_ADDR generic_skip_trampoline
*** 144,149 ****
--- 144,151 ----
  
  extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
  
+ extern int generic_in_solib_return_trampoline (CORE_ADDR pc, char *name);
+ 
  extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc);
  
  /* Assume that the world is sane, a registers raw and virtual size


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]