aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-07-20 22:50:07 +0000
committerDaniel Jacobowitz <drow@false.org>2006-07-20 22:50:07 +0000
commit16963cb64bd9999537c4a056bff9915bab2911d2 (patch)
treecba0518d01077d17a3a54fad2cd122547596ba3b /gdb/eval.c
parentd5f010e93bf3770eb8c443eb0b502c299860a1d8 (diff)
downloadgdb-16963cb64bd9999537c4a056bff9915bab2911d2.zip
gdb-16963cb64bd9999537c4a056bff9915bab2911d2.tar.gz
gdb-16963cb64bd9999537c4a056bff9915bab2911d2.tar.bz2
gdb/
* eval.c (evaluate_struct_tuple): Skip static fields. gdb/testsuite/ * gdb.cp/bs15503.exp: Update comment for no longer crashing test.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 66776ea..083bbc2 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -283,6 +283,10 @@ evaluate_struct_tuple (struct value *struct_val,
if (variantno < 0)
{
fieldno++;
+ /* Skip static fields. */
+ while (fieldno < TYPE_NFIELDS (struct_type)
+ && TYPE_FIELD_STATIC_KIND (struct_type, fieldno))
+ fieldno++;
subfieldno = fieldno;
if (fieldno >= TYPE_NFIELDS (struct_type))
error (_("too many initializers"));