[llvm] 6a20cac - [llvm-objdump] Document selecting symbols containing commas (#221619)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 03:13:10 PDT 2026
Author: Tianyi Chen
Date: 2026-09-09T11:13:05+01:00
New Revision: 6a20cac62912114cbc9208b565cf88fd73f21377
URL: https://github.com/llvm/llvm-project/commit/6a20cac62912114cbc9208b565cf88fd73f21377
DIFF: https://github.com/llvm/llvm-project/commit/6a20cac62912114cbc9208b565cf88fd73f21377.diff
LOG: [llvm-objdump] Document selecting symbols containing commas (#221619)
The documentation does not clearly distinguish how
`--disassemble-symbols=`
and `--disassemble=<symbol>` handle their arguments, making it easy to
overlook how to select symbols whose names contain commas.
Update the command guide and help text to explain that the former
accepts
a comma-separated list of symbols, while the latter accepts a single
symbol
name and may be specified multiple times.
Assisted-by: OpenAI Codex
Added:
Modified:
llvm/docs/CommandGuide/llvm-objdump.md
llvm/tools/llvm-objdump/ObjdumpOpts.td
Removed:
################################################################################
diff --git a/llvm/docs/CommandGuide/llvm-objdump.md b/llvm/docs/CommandGuide/llvm-objdump.md
index 0e4e5c7181f93..45c0054dd0de9 100644
--- a/llvm/docs/CommandGuide/llvm-objdump.md
+++ b/llvm/docs/CommandGuide/llvm-objdump.md
@@ -37,12 +37,21 @@ Disassemble all sections found in the input files.
:::
:::{option} --disassemble-symbols=<symbol1[,symbol2,...]>
-:::
-
-:::{option} --disassemble=symbol1 --disassemble=symbol2 ...
Disassemble only the specified symbols. Takes demangled symbol names when
{option}`--demangle` is specified, otherwise takes mangled symbol names.
Implies {option}`--disassemble`.
+
+Each argument is split on commas. To select a symbol whose name contains commas,
+use {option}`--disassemble` with a symbol argument instead.
+:::
+
+:::{option} --disassemble=<symbol>
+Disassemble only the specified symbol. Takes a demangled symbol name when
+{option}`--demangle` is specified, otherwise takes a mangled symbol name.
+Implies {option}`--disassemble`.
+
+The argument is a single symbol name. To select multiple symbols, specify this
+option multiple times or use {option}`--disassemble-symbols`.
:::
:::{option} --dwarf=<value>
diff --git a/llvm/tools/llvm-objdump/ObjdumpOpts.td b/llvm/tools/llvm-objdump/ObjdumpOpts.td
index e22f58236ab9a..30eb48ef3b42f 100644
--- a/llvm/tools/llvm-objdump/ObjdumpOpts.td
+++ b/llvm/tools/llvm-objdump/ObjdumpOpts.td
@@ -72,12 +72,13 @@ def traceback_table : Flag<["--"], "traceback-table">,
"This option is for XCOFF files only">;
def disassemble_symbols_EQ : Joined<["--"], "disassemble-symbols=">,
- HelpText<"List of symbols to disassemble. "
+ HelpText<"Comma-separated list of symbols to disassemble. "
"Accept demangled names when --demangle is "
"specified, otherwise accept mangled names">;
def disassemble_EQ : Joined<["--"], "disassemble=">,
- HelpText<"Specify a symbol name to diasassemble. "
+ HelpText<"Disassemble a single symbol. "
+ "May be specified multiple times. "
"Accept demangled names when --demangle is "
"specified, otherwise accept mangled names">;
More information about the llvm-commits
mailing list