From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFA 1/3] PR symtab/20652 - fix psymbol_compare
Date: Mon, 03 Oct 2016 21:54:00 -0000 [thread overview]
Message-ID: <1475531646-18049-2-git-send-email-tom@tromey.com> (raw)
In-Reply-To: <1475531646-18049-1-git-send-email-tom@tromey.com>
This fixes an oversight in psymbol_compare.
2016-10-03 Tom Tromey <tom@tromey.com>
PR symtab/20652:
* psymtab.c (psymbol_compare): Correctly compare "ginfo.value"
fields.
---
gdb/ChangeLog | 6 ++++++
gdb/psymtab.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ffbdc3d..434f750 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-03 Tom Tromey <tom@tromey.com>
+
+ PR symtab/20652:
+ * psymtab.c (psymbol_compare): Correctly compare "ginfo.value"
+ fields.
+
2016-09-29 Jan Kratochvil <jan.kratochvil@redhat.com>
PR gdb/20609 - attach of JIT-debug-enabled inf 7.11.1 regression
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)
--
2.7.4
next prev parent reply other threads:[~2016-10-03 21:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 21:54 [RFA 0/3] Fix various bugs found by static analysis Tom Tromey
2016-10-03 21:54 ` [RFA 3/3] PR remote/20655 - small fix in handle_tracepoint_bkpts Tom Tromey
2016-10-04 12:53 ` Yao Qi
2016-10-03 21:54 ` Tom Tromey [this message]
2016-10-04 10:55 ` [RFA 1/3] PR symtab/20652 - fix psymbol_compare Yao Qi
2016-10-04 18:37 ` Pedro Alves
2016-10-04 18:52 ` Tom Tromey
2016-10-03 21:54 ` [RFA 2/3] PR gdb/20653 - small cleanup in string_to_explicit_location Tom Tromey
2016-10-03 22:27 ` Keith Seitz
2016-10-04 10:50 ` Yao Qi
2016-10-04 15:14 ` [RFA 0/3] Fix various bugs found by static analysis Yao Qi
2016-10-04 18:31 ` Pedro Alves
2016-10-04 19:05 ` Eli Zaretskii
2016-10-04 20:43 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475531646-18049-2-git-send-email-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox