[RFC] Fix comment for la_store_sym_names_in_linkage_form_p

Message ID 7d5e8fca-cbaf-8749-1ba7-bcbad09cda63@suse.de
State New, archived
Headers

Commit Message

Tom de Vries June 13, 2019, 1:50 p.m. UTC
  Hi,

The comment in gdb/language.h for la_store_sym_names_in_linkage_form_p
states:
...
/* True if the symbols names should be stored in GDB's data structures
   for minimal/partial/full symbols using their linkage (aka mangled)
   form; false if the symbol names should be demangled first.
...

And for C++, la_store_sym_names_in_linkage_form_p is false.

However, AFAICT, while partial and full symbols are stored mangled,
minimal symbols are stored mangled.

This patch fixes the comment to reflect the actual situation.

Any comments?

Thanks,
- Tom
  

Comments

Tom Tromey June 13, 2019, 3:28 p.m. UTC | #1
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> This patch fixes the comment to reflect the actual situation.

Tom> Any comments?

This is ok.  Thanks for doing this.

I saw that this field is only used in a single spot in dwarf2read.c.  So
it would also be fine, I think, to remove it entirely and just check the
languages there -- that's done all over dwarf2read.c already anyway.

This whole area of storing demangled names is a mess unfortunately.
It needs a big cleanup.

Tom
  

Patch

diff --git a/gdb/language.h b/gdb/language.h
index e7446efa07..f584a7e637 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -265,7 +265,7 @@  struct language_defn
     const char *la_name_of_this;
 
     /* True if the symbols names should be stored in GDB's data structures
-       for minimal/partial/full symbols using their linkage (aka mangled)
+       for partial/full symbols using their linkage (aka mangled)
        form; false if the symbol names should be demangled first.
 
        Most languages implement symbol lookup by comparing the demangled