mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 11:39:26 +08:00
dwarf2_compute_name: add fixme, don't use same name as parameter for local
gdb/ChangeLog: * dwarf2read.c (dwarf2_compute_name): Add FIXME. Don't use a local variable name that collides with a parameter.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2015-09-20 Doug Evans <xdje42@gmail.com>
|
||||||
|
|
||||||
|
* dwarf2read.c (dwarf2_compute_name): Add FIXME. Don't use a local
|
||||||
|
variable name that collides with a parameter.
|
||||||
|
|
||||||
2015-09-20 Joel Brobecker <brobecker@adacore.com>
|
2015-09-20 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* dwarf2loc.c (locexpr_get_frame_base): Renames
|
* dwarf2loc.c (locexpr_get_frame_base): Renames
|
||||||
|
@ -8431,8 +8431,13 @@ dwarf2_compute_name (const char *name,
|
|||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
name = dwarf2_name (die, cu);
|
name = dwarf2_name (die, cu);
|
||||||
|
|
||||||
/* For Fortran GDB prefers DW_AT_*linkage_name if present but otherwise
|
/* For Fortran GDB prefers DW_AT_*linkage_name for the physname if present
|
||||||
compute it by typename_concat inside GDB. */
|
but otherwise compute it by typename_concat inside GDB.
|
||||||
|
FIXME: Actually this is not really true, or at least not always true.
|
||||||
|
It's all very confusing. SYMBOL_SET_NAMES doesn't try to demangle
|
||||||
|
Fortran names because there is no mangling standard. So new_symbol_full
|
||||||
|
will set the demangled name to the result of dwarf2_full_name, and it is
|
||||||
|
the demangled name that GDB uses if it exists. */
|
||||||
if (cu->language == language_ada
|
if (cu->language == language_ada
|
||||||
|| (cu->language == language_fortran && physname))
|
|| (cu->language == language_fortran && physname))
|
||||||
{
|
{
|
||||||
@ -8441,13 +8446,13 @@ dwarf2_compute_name (const char *name,
|
|||||||
to be able to reference. Ideally, we want the user to be able
|
to be able to reference. Ideally, we want the user to be able
|
||||||
to reference this entity using either natural or linkage name,
|
to reference this entity using either natural or linkage name,
|
||||||
but we haven't started looking at this enhancement yet. */
|
but we haven't started looking at this enhancement yet. */
|
||||||
const char *name;
|
const char *linkage_name;
|
||||||
|
|
||||||
name = dwarf2_string_attr (die, DW_AT_linkage_name, cu);
|
linkage_name = dwarf2_string_attr (die, DW_AT_linkage_name, cu);
|
||||||
if (name == NULL)
|
if (linkage_name == NULL)
|
||||||
name = dwarf2_string_attr (die, DW_AT_MIPS_linkage_name, cu);
|
linkage_name = dwarf2_string_attr (die, DW_AT_MIPS_linkage_name, cu);
|
||||||
if (name != NULL)
|
if (linkage_name != NULL)
|
||||||
return name;
|
return linkage_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* These are the only languages we know how to qualify names in. */
|
/* These are the only languages we know how to qualify names in. */
|
||||||
|
Reference in New Issue
Block a user