[Lldb-commits] [lldb] 16a816a - [lldb] [gdb-remote] Fix processing generic regnums
Michał Górny via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 29 12:37:57 PDT 2021
Author: Michał Górny
Date: 2021-10-29T21:37:46+02:00
New Revision: 16a816a19e2a8c65cf34dbf2ef9d7497b200c0b1
URL: https://github.com/llvm/llvm-project/commit/16a816a19e2a8c65cf34dbf2ef9d7497b200c0b1
DIFF: https://github.com/llvm/llvm-project/commit/16a816a19e2a8c65cf34dbf2ef9d7497b200c0b1.diff
LOG: [lldb] [gdb-remote] Fix processing generic regnums
Fix regression in processing generic regnums that was introduced
in fa456505b80b0cf83647a1b26713e4d3b38eccc2 ("[lldb] [gdb-remote]
Refactor getting remote regs to use local vector"). Since then,
the "generic" field was wrongly interpreted as integer rather than
string constant.
Thanks to Ted Woodward for noticing and providing the correct code.
Added:
Modified:
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index a6f48b04d7db8..4f78ae428147c 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -492,7 +492,7 @@ void ProcessGDBRemote::BuildDynamicRegisterInfo(bool force) {
} else if (name.equals("dwarf")) {
value.getAsInteger(0, reg_info.regnum_dwarf);
} else if (name.equals("generic")) {
- value.getAsInteger(0, reg_info.regnum_generic);
+ reg_info.regnum_generic = Args::StringToGenericRegister(value);
} else if (name.equals("container-regs")) {
SplitCommaSeparatedRegisterNumberString(value, reg_info.value_regs, 16);
} else if (name.equals("invalidate-regs")) {
More information about the lldb-commits
mailing list