From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5414 invoked by alias); 20 Aug 2002 22:28:15 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5407 invoked from network); 20 Aug 2002 22:28:14 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 20 Aug 2002 22:28:14 -0000 Received: from reddwarf.sfbay.redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id PAA02280; Tue, 20 Aug 2002 15:22:52 -0700 (PDT) Received: (from msnyder@localhost) by reddwarf.sfbay.redhat.com (8.11.2/8.11.2) id g7KMBE300488; Tue, 20 Aug 2002 15:11:14 -0700 Date: Tue, 20 Aug 2002 15:28:00 -0000 From: Michael Snyder Message-Id: <200208202211.g7KMBE300488@reddwarf.sfbay.redhat.com> To: gdb-patches@sources.redhat.com Subject: [RFA] gdbarch.sh: add IN_SOLIB_RETURN_TRAMPOLINE Cc: cagney@redhat.com X-SW-Source: 2002-08/txt/msg00627.txt.bz2 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 * 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