Skip to content

Conversation

@Michael137
Copy link
Member

The llvm-dwarfdump --name=<name> option accepts DW_AT_linkage_name names too.

The `llvm-dwarfdump --name=<name>` option accepts `DW_AT_linkage_name` names too.
@llvmbot
Copy link
Member

llvmbot commented Oct 21, 2025

@llvm/pr-subscribers-llvm-binary-utilities

Author: Michael Buch (Michael137)

Changes

The llvm-dwarfdump --name=&lt;name&gt; option accepts DW_AT_linkage_name names too.


Full diff: https://github.com/llvm/llvm-project/pull/164433.diff

2 Files Affected:

  • (modified) llvm/docs/CommandGuide/llvm-dwarfdump.rst (+1-1)
  • (modified) llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (+4-3)
diff --git a/llvm/docs/CommandGuide/llvm-dwarfdump.rst b/llvm/docs/CommandGuide/llvm-dwarfdump.rst
index 27ad4226e6cf9..137830259eb64 100644
--- a/llvm/docs/CommandGuide/llvm-dwarfdump.rst
+++ b/llvm/docs/CommandGuide/llvm-dwarfdump.rst
@@ -83,7 +83,7 @@ OPTIONS
 .. option:: -n <name>, --name=<name>
 
             Find and print all debug info entries whose name
-            (`DW_AT_name` attribute) is <name>.
+            (`DW_AT_name`/`DW_AT_linkage_name` attribute) is <name>.
 
 .. option:: --lookup=<address>
 
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index 79f05278c329d..11eb58ea911df 100644
--- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -202,9 +202,10 @@ static alias IgnoreCaseAlias("i", desc("Alias for --ignore-case."),
                              aliasopt(IgnoreCase), cl::NotHidden);
 static list<std::string> Name(
     "name",
-    desc("Find and print all debug info entries whose name (DW_AT_name "
-         "attribute) matches the exact text in <pattern>.  When used with the "
-         "the -regex option <pattern> is interpreted as a regular expression."),
+    desc("Find and print all debug info entries whose name "
+         "(DW_AT_name/DW_AT_linkage_name attribute) matches the exact text "
+         "in <pattern>.  When used with the the -regex option <pattern> is "
+         "interpreted as a regular expression."),
     value_desc("pattern"), cat(DwarfDumpCategory));
 static alias NameAlias("n", desc("Alias for --name"), aliasopt(Name),
                        cl::NotHidden);

@llvmbot
Copy link
Member

llvmbot commented Oct 21, 2025

@llvm/pr-subscribers-debuginfo

Author: Michael Buch (Michael137)

Changes

The llvm-dwarfdump --name=&lt;name&gt; option accepts DW_AT_linkage_name names too.


Full diff: https://github.com/llvm/llvm-project/pull/164433.diff

2 Files Affected:

  • (modified) llvm/docs/CommandGuide/llvm-dwarfdump.rst (+1-1)
  • (modified) llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (+4-3)
diff --git a/llvm/docs/CommandGuide/llvm-dwarfdump.rst b/llvm/docs/CommandGuide/llvm-dwarfdump.rst
index 27ad4226e6cf9..137830259eb64 100644
--- a/llvm/docs/CommandGuide/llvm-dwarfdump.rst
+++ b/llvm/docs/CommandGuide/llvm-dwarfdump.rst
@@ -83,7 +83,7 @@ OPTIONS
 .. option:: -n <name>, --name=<name>
 
             Find and print all debug info entries whose name
-            (`DW_AT_name` attribute) is <name>.
+            (`DW_AT_name`/`DW_AT_linkage_name` attribute) is <name>.
 
 .. option:: --lookup=<address>
 
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index 79f05278c329d..11eb58ea911df 100644
--- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -202,9 +202,10 @@ static alias IgnoreCaseAlias("i", desc("Alias for --ignore-case."),
                              aliasopt(IgnoreCase), cl::NotHidden);
 static list<std::string> Name(
     "name",
-    desc("Find and print all debug info entries whose name (DW_AT_name "
-         "attribute) matches the exact text in <pattern>.  When used with the "
-         "the -regex option <pattern> is interpreted as a regular expression."),
+    desc("Find and print all debug info entries whose name "
+         "(DW_AT_name/DW_AT_linkage_name attribute) matches the exact text "
+         "in <pattern>.  When used with the the -regex option <pattern> is "
+         "interpreted as a regular expression."),
     value_desc("pattern"), cat(DwarfDumpCategory));
 static alias NameAlias("n", desc("Alias for --name"), aliasopt(Name),
                        cl::NotHidden);

Copy link
Contributor

@OCHyams OCHyams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Michael137 Michael137 merged commit f4421ff into llvm:main Oct 21, 2025
12 of 14 checks passed
@Michael137 Michael137 deleted the llvm/dwarfdump-doc-fix branch October 21, 2025 17:00
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…m#164433)

The `llvm-dwarfdump --name=<name>` option accepts `DW_AT_linkage_name`
names too.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…m#164433)

The `llvm-dwarfdump --name=<name>` option accepts `DW_AT_linkage_name`
names too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants