From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7503 invoked by alias); 9 Nov 2003 12:07:55 -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 7496 invoked from network); 9 Nov 2003 12:07:49 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 9 Nov 2003 12:07:49 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id hA9C7mBB001333 for ; Sun, 9 Nov 2003 13:07:48 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id hA9C7lVI064600 for ; Sun, 9 Nov 2003 13:07:47 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id hA9C7l5n064597; Sun, 9 Nov 2003 13:07:47 +0100 (CET) Date: Sun, 09 Nov 2003 12:07:00 -0000 Message-Id: <200311091207.hA9C7l5n064597@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Multi-arch SKIP_SOLIB_RESOLVER X-SW-Source: 2003-11/txt/msg00164.txt.bz2 I'm working on integrating some mostly SPARC-related patches from David S. Miller. There were also some general bits in his tree that I'm going to check in on mainline. Here's the first. Committed as obvious (to mainline). Mark Index: ChangeLog from Mark Kettenis From David S. Miller : * gdbarch.sh (SKIP_SOLIB_RESOLVER): New method. * gdbarch.c, gdbarch.h: Regenerated. * arch-utils.c (generic_skip_solib_resolver): New function. * arch-utils.h (generic_skip_solib_resolver): New prototype. * infrun.c (SKIP_SOLIB_RESOLVER): Don't define. Index: gdbarch.sh =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.280 diff -u -p -r1.280 gdbarch.sh --- gdbarch.sh 22 Oct 2003 23:54:11 -0000 1.280 +++ gdbarch.sh 9 Nov 2003 12:03:22 -0000 @@ -700,6 +700,10 @@ f::TARGET_PRINT_INSN:int:print_insn:bfd_ f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0 +# If IN_SOLIB_DYNSYM_RESOLVE_CODE returns true, and SKIP_SOLIB_RESOLVER +# evaluates non-zero, this is the address where the debugger will place +# a step-resume breakpoint to get us past the dynamic linker. +f:2:SKIP_SOLIB_RESOLVER:CORE_ADDR:skip_solib_resolver:CORE_ADDR pc:pc:::generic_skip_solib_resolver::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. Index: arch-utils.c =================================================================== RCS file: /cvs/src/src/gdb/arch-utils.c,v retrieving revision 1.101 diff -u -p -r1.101 arch-utils.c --- arch-utils.c 31 Oct 2003 22:19:12 -0000 1.101 +++ arch-utils.c 9 Nov 2003 12:03:22 -0000 @@ -100,6 +100,12 @@ generic_skip_trampoline_code (CORE_ADDR return 0; } +CORE_ADDR +generic_skip_solib_resolver (CORE_ADDR pc) +{ + return 0; +} + int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name) { Index: arch-utils.h =================================================================== RCS file: /cvs/src/src/gdb/arch-utils.h,v retrieving revision 1.59 diff -u -p -r1.59 arch-utils.h --- arch-utils.h 27 Oct 2003 20:47:27 -0000 1.59 +++ arch-utils.h 9 Nov 2003 12:03:22 -0000 @@ -110,6 +110,8 @@ extern gdbarch_virtual_frame_pointer_fty extern CORE_ADDR generic_skip_trampoline_code (CORE_ADDR pc); +extern CORE_ADDR generic_skip_solib_resolver (CORE_ADDR pc); + extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name); extern int generic_in_solib_return_trampoline (CORE_ADDR pc, char *name); Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.117 diff -u -p -r1.117 infrun.c --- infrun.c 24 Oct 2003 17:37:03 -0000 1.117 +++ infrun.c 9 Nov 2003 12:03:25 -0000 @@ -153,10 +153,6 @@ static int may_follow_exec = MAY_FOLLOW_ #define IN_SOLIB_DYNSYM_RESOLVE_CODE(pc) 0 #endif -#ifndef SKIP_SOLIB_RESOLVER -#define SKIP_SOLIB_RESOLVER(pc) 0 -#endif - /* This function returns TRUE if pc is the address of an instruction that lies within the dynamic linker (such as the event hook, or the dld itself).