diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/psymtab.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e2b5c2b..1fc318e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-10-05 Tom Tromey <tom@tromey.com> + + PR symtab/20652: + * psymtab.c (psymbol_compare): Correctly compare "ginfo.value" + fields. + 2016-10-05 Andreas Arnez <arnez@linux.vnet.ibm.com> * dwarf2expr.c (dwarf_expr_require_composition): Allow diff --git a/gdb/psymtab.c b/gdb/psymtab.c index a39c6e2..edcaa8b 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1577,7 +1577,7 @@ psymbol_compare (const void *addr1, const void *addr2, int length) struct partial_symbol *sym1 = (struct partial_symbol *) addr1; struct partial_symbol *sym2 = (struct partial_symbol *) addr2; - return (memcmp (&sym1->ginfo.value, &sym1->ginfo.value, + return (memcmp (&sym1->ginfo.value, &sym2->ginfo.value, sizeof (sym1->ginfo.value)) == 0 && sym1->ginfo.language == sym2->ginfo.language && PSYMBOL_DOMAIN (sym1) == PSYMBOL_DOMAIN (sym2) |