2017-12-10 22:00:49 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
2017-12-04 19:24:00 +00:00
|
|
|
From: Andrew Cagney <cagney@gnu.org>
|
|
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
|
Subject: gdb-6.3-ppc64displaysymbol-20041124.patch
|
|
|
|
|
|
|
|
FileName: gdb-6.3-ppc64displaysymbol-20041124.patch
|
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
;; Include the pc's section when doing a symbol lookup so that the
|
|
|
|
;; correct symbol is found.
|
|
|
|
;;=push: Write new testcase.
|
|
|
|
|
2004-12-02 18:30:25 +00:00
|
|
|
2004-11-24 Andrew Cagney <cagney@gnu.org>
|
|
|
|
|
|
|
|
* printcmd.c (build_address_symbolic): Find a section for the
|
|
|
|
address.
|
2017-12-08 04:31:26 +00:00
|
|
|
---
|
|
|
|
gdb/printcmd.c | 8 ++++++++
|
|
|
|
1 file changed, 8 insertions(+)
|
2004-12-02 18:30:25 +00:00
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
2017-12-18 17:28:39 +00:00
|
|
|
index 7ca86232a1..9ff0d9e962 100644
|
2017-12-08 04:31:26 +00:00
|
|
|
--- a/gdb/printcmd.c
|
|
|
|
+++ b/gdb/printcmd.c
|
|
|
|
@@ -602,6 +602,14 @@ build_address_symbolic (struct gdbarch *gdbarch,
|
2004-12-02 18:30:25 +00:00
|
|
|
addr = overlay_mapped_address (addr, section);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ /* To ensure that the symbol returned belongs to the correct setion
|
|
|
|
+ (and that the last [random] symbol from the previous section
|
|
|
|
+ isn't returned) try to find the section containing PC. First try
|
|
|
|
+ the overlay code (which by default returns NULL); and second try
|
|
|
|
+ the normal section code (which almost always succeeds). */
|
|
|
|
+ section = find_pc_overlay (addr);
|
|
|
|
+ if (section == NULL)
|
2008-12-14 14:05:20 +00:00
|
|
|
+ section = find_pc_section (addr);
|
2004-12-02 18:30:25 +00:00
|
|
|
|
|
|
|
/* First try to find the address in the symbol table, then
|
|
|
|
in the minsyms. Take the closest one. */
|
2017-12-08 04:31:26 +00:00
|
|
|
--
|
|
|
|
2.14.3
|
|
|
|
|