[v2,2/4] Don't add type linkage names to cooked index

Message ID 20221014160849.919621-3-tromey@adacore.com
State Committed
Commit acd121de32c3924347f228d8f27000a09b9c8949
Headers
Series Fix .gdb_index with Ada |

Commit Message

Tom Tromey Oct. 14, 2022, 4:08 p.m. UTC
  The compiler will sometimes emit a linkage name for a type, like:

    <1d3>   DW_AT_linkage_name: (indirect string, offset: 0x106f): 11__mbstate_t

These names aren't very useful, and this patch changes the DWARF
reader so that they are ignored by the cooked index.
---
 gdb/dwarf2/read.c | 5 -----
 1 file changed, 5 deletions(-)
  

Patch

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 78f4cc1f60d..96069545000 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -17991,11 +17991,6 @@  tag_can_have_linkage_name (enum dwarf_tag tag)
 {
   switch (tag)
     {
-      /* We include types here because an anonymous C++ type might
-	 have a name for linkage purposes.  */
-    case DW_TAG_class_type:
-    case DW_TAG_structure_type:
-    case DW_TAG_union_type:
     case DW_TAG_variable:
     case DW_TAG_subprogram:
       return true;