summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2018-02-04 23:45:06 -0500
committerJoel Brobecker <brobecker@adacore.com>2018-02-04 23:48:19 -0500
commit0eb876f52f348ff08be24bca6cbca00e302839b2 (patch)
tree36a39342db7db1e40fa8a9864d35039366cc39ef
parent27d2460e7af28398649afd51acaf32a1f392a4db (diff)
downloadbinutils-gdb-0eb876f52f348ff08be24bca6cbca00e302839b2.tar.gz
Move comment in gdb/dwarf2read.c::dwarf2_physname
This commit just moves a comment right next to where it is actually relevant. No actual code change. gdb/ChangeLog: * dwarf2read.c (dwarf2_physname): Move commment. Tested by rebuilding GDB.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/dwarf2read.c16
2 files changed, 12 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b341da9886a..78509829791 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-02-05 Joel Brobecker <brobecker@adacore.com>
+
+ * dwarf2read.c (dwarf2_physname): Move commment.
+
2018-02-01 Leszek Swirski <leszeks@google.com>
* varobj.c (varobj_formatted_print_options): Allow recursive
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 51d0f39f75e..d651725bbe8 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -11141,14 +11141,6 @@ dwarf2_physname (const char *name, struct die_info *die, struct dwarf2_cu *cu)
gdb::unique_xmalloc_ptr<char> demangled;
if (mangled != NULL)
{
- /* Use DMGL_RET_DROP for C++ template functions to suppress their return
- type. It is easier for GDB users to search for such functions as
- `name(params)' than `long name(params)'. In such case the minimal
- symbol names do not match the full symbol names but for template
- functions there is never a need to look up their definition from their
- declaration so the only disadvantage remains the minimal symbol
- variant `long name(params)' does not have the proper inferior type.
- */
if (cu->language == language_go)
{
@@ -11158,6 +11150,14 @@ dwarf2_physname (const char *name, struct die_info *die, struct dwarf2_cu *cu)
}
else
{
+ /* Use DMGL_RET_DROP for C++ template functions to suppress
+ their return type. It is easier for GDB users to search
+ for such functions as `name(params)' than `long name(params)'.
+ In such case the minimal symbol names do not match the full
+ symbol names but for template functions there is never a need
+ to look up their definition from their declaration so
+ the only disadvantage remains the minimal symbol variant
+ `long name(params)' does not have the proper inferior type. */
demangled.reset (gdb_demangle (mangled,
(DMGL_PARAMS | DMGL_ANSI
| DMGL_RET_DROP)));