aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs
diff options
context:
space:
mode:
authorDaniel Thornburgh <dthorn@google.com>2023-05-17 10:57:54 -0700
committerDaniel Thornburgh <dthorn@google.com>2023-09-19 14:14:27 -0700
commitc649f29c24c9fc1502d8d53e0c96c3d24b31de1a (patch)
treeaf683d6eb12a8ff58f0b79cdcb0bab7932c847a4 /llvm/docs
parent86b32c4b55b51dec1abb15680e8566f36fb7dbd9 (diff)
downloadllvm-c649f29c24c9fc1502d8d53e0c96c3d24b31de1a.zip
llvm-c649f29c24c9fc1502d8d53e0c96c3d24b31de1a.tar.gz
llvm-c649f29c24c9fc1502d8d53e0c96c3d24b31de1a.tar.bz2
[llvm-nm] Add --line-numbers flag
This parallels the binutils/BSD flag of the same name. Debugging information is loaded to print line number information for symbols. Defined symbols are symbolized by their section addresses, and undefined symbols by their first text reloc with line info. Differential Revision: https://reviews.llvm.org/D150987
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/CommandGuide/llvm-nm.rst6
-rw-r--r--llvm/docs/ReleaseNotes.rst3
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/llvm-nm.rst b/llvm/docs/CommandGuide/llvm-nm.rst
index 4b1290a..7067bb0 100644
--- a/llvm/docs/CommandGuide/llvm-nm.rst
+++ b/llvm/docs/CommandGuide/llvm-nm.rst
@@ -190,6 +190,12 @@ OPTIONS
Print just the symbol names. Alias for `--format=just-symbols``.
+.. option:: --line-numbers, -l
+
+ Use debugging information to print the filenames and line numbers where
+ symbols are defined. Undefined symbols have the location of their first
+ relocation printed instead.
+
.. option:: -m
Use Darwin format. Alias for ``--format=darwin``.
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 352420e..660bb4e 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -177,6 +177,9 @@ Changes to the LLVM tools
* llvm-readelf now supports ``--extra-sym-info`` (``-X``) to display extra
information (section name) when showing symbols.
+* ``llvm-nm`` now supports the ``--line-numbers`` (``-l``) option to use
+ debugging information to print symbols' filenames and line numbers.
+
Changes to LLDB
---------------------------------