diff options
author | Doug Evans <xdje42@gmail.com> | 2015-09-20 14:13:54 -0700 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2015-09-20 14:13:54 -0700 |
commit | 2ee7123e5a54fba15b976a05bce173871eba8aba (patch) | |
tree | 9aa3e568e4dbd033117ca14bc0daca5a7c493bbc /gdb/dwarf2read.c | |
parent | 7d1c9c9b4c586ede0abecb7a0a47d8996aaf56da (diff) | |
download | binutils-2ee7123e5a54fba15b976a05bce173871eba8aba.zip binutils-2ee7123e5a54fba15b976a05bce173871eba8aba.tar.gz binutils-2ee7123e5a54fba15b976a05bce173871eba8aba.tar.bz2 |
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.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 6ec8595..b8c0872 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -8431,8 +8431,13 @@ dwarf2_compute_name (const char *name, if (name == NULL) name = dwarf2_name (die, cu); - /* For Fortran GDB prefers DW_AT_*linkage_name if present but otherwise - compute it by typename_concat inside GDB. */ + /* For Fortran GDB prefers DW_AT_*linkage_name for the physname if present + 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 || (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 reference this entity using either natural or linkage name, 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); - if (name == NULL) - name = dwarf2_string_attr (die, DW_AT_MIPS_linkage_name, cu); - if (name != NULL) - return name; + linkage_name = dwarf2_string_attr (die, DW_AT_linkage_name, cu); + if (linkage_name == NULL) + linkage_name = dwarf2_string_attr (die, DW_AT_MIPS_linkage_name, cu); + if (linkage_name != NULL) + return linkage_name; } /* These are the only languages we know how to qualify names in. */ |