This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: shlibs/2063: Unable to step into shared library
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 7 Jan 2006 20:48:01 -0000
- Subject: Re: shlibs/2063: Unable to step into shared library
- Reply-to: Mark Kettenis <mark dot kettenis at xs4all dot nl>
The following reply was made to PR shlibs/2063; it has been noted by GNATS.
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: drow@false.org
Cc: gdb-gnats@sourceware.org, steve@telxio.com
Subject: Re: shlibs/2063: Unable to step into shared library
Date: Sat, 7 Jan 2006 21:43:40 +0100 (CET)
> Date: Sat, 7 Jan 2006 15:24:31 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> There's a whole bunch of openbsd bits in this patch that I'm not sure
> you meant to include... especially this one:
>
> On Sat, Jan 07, 2006 at 07:18:01PM -0000, Mark Kettenis wrote:
> > Index: config/sparc/sol2.mt
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/config/sparc/sol2.mt,v
> > retrieving revision 1.4
> > diff -u -p -r1.4 sol2.mt
> > --- config/sparc/sol2.mt 13 Sep 2004 20:55:42 -0000 1.4
> > +++ config/sparc/sol2.mt 7 Jan 2006 19:11:00 -0000
> > @@ -1,3 +1,3 @@
> > # Target: Solaris SPARC
> > -TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o solib.o solib-svr4.o
> > +TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o obsd-tdep.o solib.o solib-svr4.o
> > DEPRECATED_TM_FILE= tm-sol2.h
> >
Bleah, yes. That should have been sol2-tdep.o. And it looks like I
generated the wrong patch. Here's a new one:
Index: sol2-tdep.c
===================================================================
RCS file: sol2-tdep.c
diff -N sol2-tdep.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ sol2-tdep.c 7 Jan 2006 20:42:49 -0000
@@ -0,0 +1,38 @@
+/* Target-dependent code for Solaris.
+
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+#include "defs.h"
+#include "frame.h"
+#include "symtab.h"
+
+#include "obsd-tdep.h"
+
+CORE_ADDR
+sol2_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+ struct minimal_symbol *msym;
+
+ msym = lookup_minimal_symbol("elf_bndr", NULL, NULL);
+ if (msym && SYMBOL_VALUE_ADDRESS (msym) == pc)
+ return frame_pc_unwind (get_current_frame ());
+
+ return 0;
+}
Index: sol2-tdep.h
===================================================================
RCS file: sol2-tdep.h
diff -N sol2-tdep.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ sol2-tdep.h 7 Jan 2006 20:42:49 -0000
@@ -0,0 +1,29 @@
+/* Target-dependent code for Solaris.
+
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+#ifndef SOL2_TDEP_H
+#define SOL2_TDEP_H 1
+
+struct gdbarch;
+
+CORE_ADDR sol2_skip_solib_resolver (struct gdbarch *, CORE_ADDR);
+
+#endif /* sol2-tdep.h */
Index: sparc-sol2-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-sol2-tdep.c,v
retrieving revision 1.10
diff -u -p -r1.10 sparc-sol2-tdep.c
--- sparc-sol2-tdep.c 17 Dec 2005 22:34:02 -0000 1.10
+++ sparc-sol2-tdep.c 7 Jan 2006 20:42:50 -0000
@@ -1,6 +1,6 @@
/* Target-dependent code for Solaris SPARC.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GDB.
@@ -33,6 +33,7 @@
#include "gdb_assert.h"
#include "gdb_string.h"
+#include "sol2-tdep.h"
#include "sparc-tdep.h"
#include "solib-svr4.h"
@@ -178,6 +179,7 @@ sparc32_sol2_init_abi (struct gdbarch_in
/* Solaris has SVR4-style shared libraries... */
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+ set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
Index: sparc64-sol2-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc64-sol2-tdep.c,v
retrieving revision 1.9
diff -u -p -r1.9 sparc64-sol2-tdep.c
--- sparc64-sol2-tdep.c 17 Dec 2005 22:34:02 -0000 1.9
+++ sparc64-sol2-tdep.c 7 Jan 2006 20:42:50 -0000
@@ -1,6 +1,6 @@
/* Target-dependent code for Solaris UltraSPARC.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GDB.
@@ -30,6 +30,7 @@
#include "gdb_assert.h"
+#include "sol2-tdep.h"
#include "sparc64-tdep.h"
#include "solib-svr4.h"
@@ -160,6 +161,7 @@ sparc64_sol2_init_abi (struct gdbarch_in
/* Solaris has SVR4-style shared libraries... */
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+ set_gdbarch_skip_solib_resolver (gdbarch, sol2_skip_solib_resolver);
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_lp64_fetch_link_map_offsets);
Index: config/sparc/sol2-64.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/sol2-64.mt,v
retrieving revision 1.3
diff -u -p -r1.3 sol2-64.mt
--- config/sparc/sol2-64.mt 13 Sep 2004 20:55:42 -0000 1.3
+++ config/sparc/sol2-64.mt 7 Jan 2006 20:42:50 -0000
@@ -1,4 +1,4 @@
# Target: Solaris UltraSPARC
TDEPFILES= sparc64-tdep.o sparc64-sol2-tdep.o sparc-tdep.o sparc-sol2-tdep.o \
- solib.o solib-svr4.o
+ sol2-tdep.o solib.o solib-svr4.o
DEPRECATED_TM_FILE= tm-sol2.h
Index: config/sparc/sol2.mt
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/sol2.mt,v
retrieving revision 1.4
diff -u -p -r1.4 sol2.mt
--- config/sparc/sol2.mt 13 Sep 2004 20:55:42 -0000 1.4
+++ config/sparc/sol2.mt 7 Jan 2006 20:42:50 -0000
@@ -1,3 +1,3 @@
# Target: Solaris SPARC
-TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o solib.o solib-svr4.o
+TDEPFILES= sparc-tdep.o sparc-sol2-tdep.o sol2-tdep.o solib.o solib-svr4.o
DEPRECATED_TM_FILE= tm-sol2.h