Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] rs6000-tdep.c: Use bfd info for computing size of word
@ 2002-04-12  0:41 Kevin Buettner
  0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2002-04-12  0:41 UTC (permalink / raw)
  To: gdb-patches

I've just committed the patch below...

	From Jimi X <jimix@watson.ibm.com>:
	* rs6000-tdep.c (rs6000_gdbarch_init): Compute ``wordsize'' from
	bfd info.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.51
diff -u -p -r1.51 rs6000-tdep.c
--- rs6000-tdep.c	12 Apr 2002 07:20:32 -0000	1.51
+++ rs6000-tdep.c	12 Apr 2002 07:35:48 -0000
@@ -2499,7 +2499,11 @@ rs6000_gdbarch_init (struct gdbarch_info
     }
   else
     {
-      wordsize = 4;
+      if (info.bfd_arch_info != NULL && info.bfd_arch_info->bits_per_word != 0)
+	wordsize = info.bfd_arch_info->bits_per_word /
+	  info.bfd_arch_info->bits_per_byte;
+      else
+	wordsize = 4;
     }
 
   /* Find a candidate among extant architectures. */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-12  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-12  0:41 [PATCH] rs6000-tdep.c: Use bfd info for computing size of word Kevin Buettner

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