aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-09-30 15:42:28 -0600
committerTom Tromey <tom@tromey.com>2016-10-05 10:31:34 -0600
commit3e611445bf05fa20e0befa41afa42651d1983734 (patch)
tree70e973f9d9fbd68f0183c4667beb66d60c1be412 /gdb
parentfdebf1a415f565fc4606f9139d10d1e9393999c0 (diff)
downloadgdb-3e611445bf05fa20e0befa41afa42651d1983734.zip
gdb-3e611445bf05fa20e0befa41afa42651d1983734.tar.gz
gdb-3e611445bf05fa20e0befa41afa42651d1983734.tar.bz2
PR symtab/20652 - fix psymbol_compare
This fixes an oversight in psymbol_compare. 2016-10-05 Tom Tromey <tom@tromey.com> PR symtab/20652: * psymtab.c (psymbol_compare): Correctly compare "ginfo.value" fields.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/psymtab.c2
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)