From: Tom Tromey Date: Fri, 30 Sep 2016 21:42:28 +0000 (-0600) Subject: PR symtab/20652 - fix psymbol_compare X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e611445bf05fa20e0befa41afa42651d1983734;p=binutils-gdb.git PR symtab/20652 - fix psymbol_compare This fixes an oversight in psymbol_compare. 2016-10-05 Tom Tromey PR symtab/20652: * psymtab.c (psymbol_compare): Correctly compare "ginfo.value" fields. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e2b5c2b4207..1fc318ef7b4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-10-05 Tom Tromey + + PR symtab/20652: + * psymtab.c (psymbol_compare): Correctly compare "ginfo.value" + fields. + 2016-10-05 Andreas Arnez * dwarf2expr.c (dwarf_expr_require_composition): Allow diff --git a/gdb/psymtab.c b/gdb/psymtab.c index a39c6e257a2..edcaa8bd9c2 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)