This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix AMD64 classification for classes with static members


The "new" gdb.cp/bs15503.exp test triggered an internal error on
AMD64.  This patch fixes the problem.

Committed,

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* x86-64-tdep.c (amd64_classify_aggregate): Ignore static fields.

Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.108
diff -u -p -r1.108 x86-64-tdep.c
--- x86-64-tdep.c 10 Jan 2004 12:52:41 -0000 1.108
+++ x86-64-tdep.c 10 Jan 2004 13:18:57 -0000
@@ -318,6 +318,10 @@ amd64_classify_aggregate (struct type *t
 	  int pos = TYPE_FIELD_BITPOS (type, i) / 64;
 	  enum amd64_reg_class subclass[2];
 
+	  /* Ignore static fields.  */
+	  if (TYPE_FIELD_STATIC (type, i))
+	    continue;
+
 	  gdb_assert (pos == 0 || pos == 1);
 
 	  amd64_classify (subtype, subclass);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]