summaryrefslogtreecommitdiff
path: root/gdb/completer.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2010-03-26 18:05:41 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2010-03-26 18:05:41 +0000
commit5e40af195bd74a66d300d8f481cab1f2ba533f3a (patch)
tree32e004f7d63d4849e05b26711627e69dca75b0c7 /gdb/completer.c
parentc218397846b823fb3c46574cc17a30ae1d281353 (diff)
downloadgdb-5e40af195bd74a66d300d8f481cab1f2ba533f3a.tar.gz
ChangeLog:
* dwarf2read.c (dwarf2_name): Work around GCC bugzilla debug/41828 by ignoring spurious DW_AT_name attributes for unnamed structs or unions. * completer.c (add_struct_fields): Fix inverted logic. testsuite/ChangeLog: * gdb.cp/inherit.exp (test_ptype_si): XFAIL test for GCC versions that do not provide the tagless_struct type name at all. (test_print_anon_union): Do not check value of uninitialized union member. Do not use cp_test_ptype_class, so we can accept "long" as well as "long int".
Diffstat (limited to 'gdb/completer.c')
-rw-r--r--gdb/completer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/completer.c b/gdb/completer.c
index 53275c0e73a..e678fb1b20c 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -401,7 +401,7 @@ add_struct_fields (struct type *type, int *nextp, char **output,
computed_type_name = 1;
}
/* Omit constructors from the completion list. */
- if (type_name && strcmp (type_name, name))
+ if (!type_name || strcmp (type_name, name))
{
output[*nextp] = xstrdup (name);
++*nextp;