mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
addr2line: fix missing inlined frames.
2014-05-28 Tristan Gingold <gingold@adacore.com> * dwarf2.c (lookup_address_in_function_table): Add best_fit_len to keep the length of the best fit range. (lookup_symbol_in_function_table, info_hash_lookup_funcinfo): Likewise.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2014-05-28 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
|
* dwarf2.c (lookup_address_in_function_table): Add best_fit_len
|
||||||
|
to keep the length of the best fit range.
|
||||||
|
(lookup_symbol_in_function_table, info_hash_lookup_funcinfo):
|
||||||
|
Likewise.
|
||||||
|
|
||||||
2014-05-27 DJ Delorie <dj@redhat.com>
|
2014-05-27 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
* bfd/elf32-rx.c (get_symbol_value_maybe): New.
|
* bfd/elf32-rx.c (get_symbol_value_maybe): New.
|
||||||
|
21
bfd/dwarf2.c
21
bfd/dwarf2.c
@ -1994,6 +1994,7 @@ lookup_address_in_function_table (struct comp_unit *unit,
|
|||||||
{
|
{
|
||||||
struct funcinfo* each_func;
|
struct funcinfo* each_func;
|
||||||
struct funcinfo* best_fit = NULL;
|
struct funcinfo* best_fit = NULL;
|
||||||
|
bfd_vma best_fit_len = 0;
|
||||||
struct arange *arange;
|
struct arange *arange;
|
||||||
|
|
||||||
for (each_func = unit->function_table;
|
for (each_func = unit->function_table;
|
||||||
@ -2007,9 +2008,11 @@ lookup_address_in_function_table (struct comp_unit *unit,
|
|||||||
if (addr >= arange->low && addr < arange->high)
|
if (addr >= arange->low && addr < arange->high)
|
||||||
{
|
{
|
||||||
if (!best_fit
|
if (!best_fit
|
||||||
|| (arange->high - arange->low
|
|| arange->high - arange->low < best_fit_len)
|
||||||
< best_fit->arange.high - best_fit->arange.low))
|
{
|
||||||
best_fit = each_func;
|
best_fit = each_func;
|
||||||
|
best_fit_len = arange->high - arange->low;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2038,6 +2041,7 @@ lookup_symbol_in_function_table (struct comp_unit *unit,
|
|||||||
{
|
{
|
||||||
struct funcinfo* each_func;
|
struct funcinfo* each_func;
|
||||||
struct funcinfo* best_fit = NULL;
|
struct funcinfo* best_fit = NULL;
|
||||||
|
bfd_vma best_fit_len = 0;
|
||||||
struct arange *arange;
|
struct arange *arange;
|
||||||
const char *name = bfd_asymbol_name (sym);
|
const char *name = bfd_asymbol_name (sym);
|
||||||
asection *sec = bfd_get_section (sym);
|
asection *sec = bfd_get_section (sym);
|
||||||
@ -2056,9 +2060,11 @@ lookup_symbol_in_function_table (struct comp_unit *unit,
|
|||||||
&& each_func->name
|
&& each_func->name
|
||||||
&& strcmp (name, each_func->name) == 0
|
&& strcmp (name, each_func->name) == 0
|
||||||
&& (!best_fit
|
&& (!best_fit
|
||||||
|| (arange->high - arange->low
|
|| arange->high - arange->low < best_fit_len))
|
||||||
< best_fit->arange.high - best_fit->arange.low)))
|
{
|
||||||
best_fit = each_func;
|
best_fit = each_func;
|
||||||
|
best_fit_len = arange->high - arange->low;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3173,6 +3179,7 @@ info_hash_lookup_funcinfo (struct info_hash_table *hash_table,
|
|||||||
{
|
{
|
||||||
struct funcinfo* each_func;
|
struct funcinfo* each_func;
|
||||||
struct funcinfo* best_fit = NULL;
|
struct funcinfo* best_fit = NULL;
|
||||||
|
bfd_vma best_fit_len = 0;
|
||||||
struct info_list_node *node;
|
struct info_list_node *node;
|
||||||
struct arange *arange;
|
struct arange *arange;
|
||||||
const char *name = bfd_asymbol_name (sym);
|
const char *name = bfd_asymbol_name (sym);
|
||||||
@ -3191,9 +3198,11 @@ info_hash_lookup_funcinfo (struct info_hash_table *hash_table,
|
|||||||
&& addr >= arange->low
|
&& addr >= arange->low
|
||||||
&& addr < arange->high
|
&& addr < arange->high
|
||||||
&& (!best_fit
|
&& (!best_fit
|
||||||
|| (arange->high - arange->low
|
|| arange->high - arange->low < best_fit_len))
|
||||||
< best_fit->arange.high - best_fit->arange.low)))
|
{
|
||||||
best_fit = each_func;
|
best_fit = each_func;
|
||||||
|
best_fit_len = arange->high - arange->low;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user