[all-commits] [llvm/llvm-project] d8ebb0: [lldb] Have disassembler show load addresses when ...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Sun Nov 10 23:18:51 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d8ebb08a89734478bc66341cb95559b00a05b0b5
https://github.com/llvm/llvm-project/commit/d8ebb08a89734478bc66341cb95559b00a05b0b5
Author: Pavel Labath <pavel at labath.sk>
Date: 2024-11-11 (Mon, 11 Nov 2024)
Changed paths:
M lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp
M lldb/test/Shell/Commands/command-disassemble-process.yaml
M lldb/test/Shell/Commands/command-disassemble.s
Log Message:
-----------
[lldb] Have disassembler show load addresses when using a core file (#115453)
We got a bug report that the disassember output was not relocated (i.e.
a load address) for a core file (like it is for a live process). It
turns out this behavior it depends on whether the instructions were read
from an executable file or from process memory (a core file will not
typically contain the memory image for segments backed by an executable
file).
It's unclear whether this behavior is intentional, or if it was just
trying to handle the case where we're dissassembling a module without a
process, but I think it's undesirable. What makes it particularly
confusing is that the instruction addresses are relocated in this case
(unlike the when we don't have a process), so with large files and
adresses it gets very hard to see whether the relocation has been
applied or not.
This patch removes the data_from_file check so that the instruction is
relocated regardless of where it was read from. It will still not get
relocated for the raw module use case, as those can't be relocated
anywhere as they don't have a load address.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list