Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [COMMIT] Disentangle SPARC Linux from Solaris
@ 2005-04-22 19:07 Mark Kettenis
  2005-04-22 19:12 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2005-04-22 19:07 UTC (permalink / raw)
  To: gdb-patches

It doesn't really make sense anymore for the Linux targets to be based
on thee Solaris targets.

Committed,

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* sparc-linux-tdep.c: Update copyright year.
	(sparc32_linux_init_abi): Set skip_trampoline_code and
	solib_svr4_fetch_link_map_offsets.  Set TDEP->plt_entry_size.
	Don't set software_single_step and don't call
	sparc32_sol2_init_abi.
	* sparc64-linux-tdep.c: Update copyright year.
	(sparc64_linux_init_abi): Set skip_trampoline_code and
	solib_svr4_fetch_link_map_offsets.  Set TDEP->plt_entry_size.
	Don't set software_single_step and don't call
	sparc64_sol2_init_abi.

Index: sparc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-linux-tdep.c,v
retrieving revision 1.11
diff -u -p -r1.11 sparc-linux-tdep.c
--- sparc-linux-tdep.c 21 Apr 2005 22:04:04 -0000 1.11
+++ sparc-linux-tdep.c 22 Apr 2005 19:04:19 -0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux SPARC.
 
-   Copyright 2003, 2004 Free Software Foundation, Inc.
+   Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -144,14 +144,19 @@ sparc32_linux_sigframe_init (const struc
 static void
 sparc32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
   tramp_frame_prepend_unwinder (gdbarch, &sparc32_linux_sigframe);
   tramp_frame_prepend_unwinder (gdbarch, &sparc32_linux_rt_sigframe);
 
-  /* GNU/Linux is very similar to Solaris ...  */
-  sparc32_sol2_init_abi (info, gdbarch);
-
-  /* ... but doesn't have kernel-assisted single-stepping support.  */
-  set_gdbarch_software_single_step (gdbarch, sparc_software_single_step);
+  /* GNU/Linux has SVR4-style shared libraries...  */
+  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
+  /* ...which means that we need some special handling when doing
+     prologue analysis.  */
+  tdep->plt_entry_size = 12;
 
   /* GNU/Linux doesn't support the 128-bit `long double' from the psABI.  */
   set_gdbarch_long_double_bit (gdbarch, 64);
Index: sparc64-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc64-linux-tdep.c,v
retrieving revision 1.6
diff -u -p -r1.6 sparc64-linux-tdep.c
--- sparc64-linux-tdep.c 21 Apr 2005 22:04:04 -0000 1.6
+++ sparc64-linux-tdep.c 22 Apr 2005 19:04:20 -0000
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux UltraSPARC.
 
-   Copyright 2003, 2004 Free Software Foundation, Inc.
+   Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -106,11 +106,14 @@ sparc64_linux_init_abi (struct gdbarch_i
 
   tramp_frame_prepend_unwinder (gdbarch, &sparc64_linux_rt_sigframe);
 
-  /* GNU/Linux is very similar to Solaris ...  */
-  sparc64_sol2_init_abi (info, gdbarch);
-
-  /* ... but doesn't have kernel-assisted single-stepping support.  */
-  set_gdbarch_software_single_step (gdbarch, sparc_software_single_step);
+  /* GNU/Linux has SVR4-style shared libraries...  */
+  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+  set_solib_svr4_fetch_link_map_offsets
+    (gdbarch, svr4_lp64_fetch_link_map_offsets);
+
+  /* ...which means that we need some special handling when doing
+     prologue analysis.  */
+  tdep->plt_entry_size = 16;
 
   /* Enable TLS support.  */
   set_gdbarch_fetch_tls_load_module_address (gdbarch,


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

* Re: [COMMIT] Disentangle SPARC Linux from Solaris
  2005-04-22 19:07 [COMMIT] Disentangle SPARC Linux from Solaris Mark Kettenis
@ 2005-04-22 19:12 ` David S. Miller
  2005-04-22 20:00   ` Mark Kettenis
  0 siblings, 1 reply; 4+ messages in thread
From: David S. Miller @ 2005-04-22 19:12 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Fri, 22 Apr 2005 21:07:10 +0200 (CEST)
Mark Kettenis <mark.kettenis@xs4all.nl> wrote:

> It doesn't really make sense anymore for the Linux targets to be based
> on thee Solaris targets.

I know you were going to do this and was concerned you'd forget
the necessary config/sparc/linux*.mt changes, which you did :-)
I should have mentioned my premonition last night.

Will you take care of it or should I?


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

* Re: [COMMIT] Disentangle SPARC Linux from Solaris
  2005-04-22 19:12 ` David S. Miller
@ 2005-04-22 20:00   ` Mark Kettenis
  2005-04-22 22:31     ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2005-04-22 20:00 UTC (permalink / raw)
  To: davem; +Cc: gdb-patches

   Date: Fri, 22 Apr 2005 12:05:14 -0700
   From: "David S. Miller" <davem@davemloft.net>

   On Fri, 22 Apr 2005 21:07:10 +0200 (CEST)
   Mark Kettenis <mark.kettenis@xs4all.nl> wrote:

   > It doesn't really make sense anymore for the Linux targets to be based
   > on thee Solaris targets.

   I know you were going to do this and was concerned you'd forget
   the necessary config/sparc/linux*.mt changes, which you did :-)
   I should have mentioned my premonition last night.

   Will you take care of it or should I?

Actually, I left sparc-sol2-tdep.c and sparc64-sol2-tdep.c in there on
purpose.  That way you can use the same gdb to debug Solaris binaries
too ;-).  We're slowly moving into the direction of having a single
gdb that can debug basically everything.

Mark


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

* Re: [COMMIT] Disentangle SPARC Linux from Solaris
  2005-04-22 20:00   ` Mark Kettenis
@ 2005-04-22 22:31     ` David S. Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2005-04-22 22:31 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Fri, 22 Apr 2005 22:00:31 +0200 (CEST)
Mark Kettenis <mark.kettenis@xs4all.nl> wrote:

> Actually, I left sparc-sol2-tdep.c and sparc64-sol2-tdep.c in there on
> purpose.  That way you can use the same gdb to debug Solaris binaries
> too ;-).  We're slowly moving into the direction of having a single
> gdb that can debug basically everything.

Ok fine.


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

end of thread, other threads:[~2005-04-22 22:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-22 19:07 [COMMIT] Disentangle SPARC Linux from Solaris Mark Kettenis
2005-04-22 19:12 ` David S. Miller
2005-04-22 20:00   ` Mark Kettenis
2005-04-22 22:31     ` David S. Miller

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