Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions llvm/docs/CommandGuide/llvm-addr2line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Here are some of those differences:
- ``llvm-addr2line`` parses options from the environment variable
``LLVM_ADDR2LINE_OPTS`` instead of from ``LLVM_SYMBOLIZER_OPTS``.

- ``llvm-addr2line`` accepts an address with a '+' prefix ie `+0x00777fff`
this is not valid in ``llvm-symbolizer``

SEE ALSO
--------

Expand Down
1 change: 1 addition & 0 deletions llvm/docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ Changes to the LLVM tools
* llvm-strip now supports continuing to process files on encountering an error.
* In llvm-objcopy/llvm-strip's ELF port, `--discard-locals` and `--discard-all` now allow and preserve symbols referenced by relocations.
([#47468](https://github.com/llvm/llvm-project/issues/47468))
* llvm-addr2line now supports a `+` prefix when specifying an address.

Changes to LLDB
---------------------------------
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-symbolizer/symbol-search.test
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ RUN: llvm-addr2line --obj=%p/Inputs/symbols.so func_01+0A | FileCheck --check-pr

# If '+' is not preceded by a symbol, it is part of a symbol name, not an offset separator.
RUN: llvm-symbolizer --obj=%p/Inputs/symbols.so +0x1138 | FileCheck --check-prefix=NONEXISTENT %s
# in addr2line address starting with a `+` sign is a valid address
# In addr2line address starting with a `+` sign is a valid address.
RUN: llvm-addr2line --obj=%p/Inputs/symbols.so +0x1138 | FileCheck --check-prefix=CODE-CMD %s

# Show that C++ mangled names may be specified.
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static Error parseCommand(StringRef BinaryName, bool IsAddr2Line,
bool StartsWithDigit = std::isdigit(AddrSpec.front());

// GNU addr2line assumes the address is hexadecimal and allows a redundant
// "0x" or "0X" prefix or with an optional `+` sign; do the same for
// "0x", "0X" prefix or an optional `+` sign; do the same for
// compatibility.
if (IsAddr2Line) {
AddrSpec.consume_front_insensitive("0x") ||
Expand Down
Loading