[1/7] Compare section index in lookup_minimal_symbol_by_pc_section
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
fail
|
Testing failed
|
Commit Message
This changes lookup_minimal_symbol_by_pc_section to compare the
section index when comparing two symbols. This is ok because the
symbols in question always come from the same objfile. The motivation
for this is to simplify a refactoring in a subsequent patch; but it is
also more efficient.
---
gdb/minsyms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -901,8 +901,8 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
&& (msymbol[hi].size () == msymbol[hi - 1].size ())
&& (msymbol[hi].unrelocated_address ()
== msymbol[hi - 1].unrelocated_address ())
- && (msymbol[hi].obj_section (objfile)
- == msymbol[hi - 1].obj_section (objfile)))
+ && (msymbol[hi].section_index ()
+ == msymbol[hi - 1].section_index ()))
{
hi--;
continue;