forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In lldb, we are using hardcoded encodings in different places:
lldb/source/Host/common/NativeProcessProtocol.cpp: inNativeProcessProtocol::GetSoftwareBreakpointTrapOpcode,g_dpu_opcodeis thebkpencodinglldb/scripts/dpu/dpu_commands.py: indpu_attach_on_boot, we write thebkpencoding to memorylldb/source/Plugins/Process/Dpu/Dpu.cpp:- in
Dpu::Boot,breakpoint_instructionis thebkpencoding - in
Dpu::GetThreadState, we check whetherprev_instructionis thefault 1encoding
- in
lldb/source/Plugins/Process/Utility/RegisterContextDPU.cpp: inRegisterContextDPU::PCIsInstructionReturnwe check whetherinstructionis thejump r23encoding
This is mainly an issue when changing the ISA, which does not happen every week. However, when it happens, fixing some lldb issues may become harder than needed.
I think we should at least place all these encodings in a single place (per language), which will make it easier to change these values. Ideally we can imagine to generate these files from the metasm module.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request