Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: mark.kettenis@xs4all.nl
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH]: Get dwarf2 working on sparc64 too.
Date: Sat, 08 Apr 2006 23:03:00 -0000	[thread overview]
Message-ID: <20060408.160342.53614785.davem@davemloft.net> (raw)
In-Reply-To: <20060408.151611.43979592.davem@davemloft.net>

From: "David S. Miller" <davem@davemloft.net>
Date: Sat, 08 Apr 2006 15:16:11 -0700 (PDT)

Actually...

> The one generated here in dwarf2-frame.c:dwarf2_frame_cache():
> 
> 	if (fs->regs.reg[column].how == DWARF2_FRAME_REG_UNSPECIFIED)
> 	  {
> 	    if (cache->reg[regnum].how == DWARF2_FRAME_REG_UNSPECIFIED)
> 	      complaint (&symfile_complaints, _("\
> incomplete CFI data; unspecified registers (e.g., %s) at 0x%s"),
> 			 gdbarch_register_name (gdbarch, regnum),
> 			 paddr_nz (fs->pc));
> 	  }
> 
> It will be generated for every global register (other than %g0 which
> we already explicitly mark on Sparc) without my change.

I went back and I'm having trouble reproducing this issue right now.
Really strange.

So let's just do the obvious stuff since the testsuite works fine
and doesn't generate the warnings anymore on Sparc/Linux with the
following patch.

Ok to apply?

We can investigate the global register stuff later if it pops up
again.

Thanks a bunch for your reviewing efforts Mark.

2006-04-08  David S. Miller  <davem@sunset.davemloft.net>

	* sparc64-linux-tdep.c (sparc64_linux_init_abi): Append dwarf2
	frame sniffer.
	* sparc-tdep.c (sparc32_gdbarch_init): Make sure to call
	dwarf2_frame_set_init_reg() before gdbarch_init_osabi() so
	that the latter can override.
	* Makefile.in (sparc64-linux-tdep.o): Update dependencies.

Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.170
diff -u -p -r1.170 sparc-tdep.c
--- sparc-tdep.c	5 Apr 2006 20:01:19 -0000	1.170
+++ sparc-tdep.c	8 Apr 2006 22:57:48 -0000
@@ -1296,14 +1296,14 @@ sparc32_gdbarch_init (struct gdbarch_inf
 
   frame_base_set_default (gdbarch, &sparc32_frame_base);
 
-  /* Hook in ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
-
   /* Hook in the DWARF CFI frame unwinder.  */
   dwarf2_frame_set_init_reg (gdbarch, sparc32_dwarf2_frame_init_reg);
   /* FIXME: kettenis/20050423: Don't enable the unwinder until the
      StackGhost issues have been resolved.  */
 
+  /* Hook in ABI-specific overrides, if they have been registered.  */
+  gdbarch_init_osabi (info, gdbarch);
+
   frame_unwind_append_sniffer (gdbarch, sparc32_frame_sniffer);
 
   /* If we have register sets, enable the generic core file support.  */
Index: sparc64-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc64-linux-tdep.c,v
retrieving revision 1.13
diff -u -p -r1.13 sparc64-linux-tdep.c
--- sparc64-linux-tdep.c	8 Apr 2006 21:15:26 -0000	1.13
+++ sparc64-linux-tdep.c	8 Apr 2006 22:57:48 -0000
@@ -22,6 +22,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "frame-unwind.h"
+#include "dwarf2-frame.h"
 #include "regset.h"
 #include "regcache.h"
 #include "gdbarch.h"
@@ -195,6 +196,9 @@ sparc64_linux_init_abi (struct gdbarch_i
 
   tramp_frame_prepend_unwinder (gdbarch, &sparc64_linux_rt_sigframe);
 
+  /* Hook in the DWARF CFI frame unwinder.  */
+  frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+
   sparc64_init_abi (info, gdbarch);
 
   /* GNU/Linux has SVR4-style shared libraries...  */
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.806
diff -u -p -r1.806 Makefile.in
--- Makefile.in	8 Apr 2006 21:15:26 -0000	1.806
+++ Makefile.in	8 Apr 2006 23:01:13 -0000
@@ -2616,9 +2616,9 @@ sparc64-linux-nat.o: sparc64-linux-nat.c
 	$(gregset_h) $(sparc64_tdep_h) $(sparc_tdep_h) \
 	$(sparc_nat_h) $(inferior_h) $(target_h) $(linux_nat_h)
 sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(frame_h) \
-	$(frame_unwind_h) $(regset_h) $(regcache_h) $(gdbarch_h) \
-	$(gdbcore_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) $(trad_frame_h) \
-	$(tramp_frame_h) $(sparc64_tdep_h)
+	$(frame_unwind_h) $(dwarf2-frame_h) $(regset_h) $(regcache_h) \
+	$(gdbarch_h) $(gdbcore_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) \
+	$(trad_frame_h) $(tramp_frame_h) $(sparc64_tdep_h)
 sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \
 	$(sparc_nat_h)
 sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(regcache_h) $(target_h) \


  reply	other threads:[~2006-04-08 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06  0:16 David S. Miller
2006-04-08 21:01 ` Mark Kettenis
2006-04-08 22:16   ` David S. Miller
2006-04-08 23:03     ` David S. Miller [this message]
2006-04-09  7:17       ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060408.160342.53614785.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mark.kettenis@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox