[Lldb-commits] [lldb] [lldb] Restore autosense for expedited memory-cache address parsing (PR #211846)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 24 09:25:14 PDT 2026
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/211846
PR #211495 changed the expedited "memory:<addr>=<bytes>" address parse in SetThreadStopInfo from autosense (radix 0) to explicit base 16. debugserver sends this address with a "0x" prefix, and StringRef::getAsInteger only strips that prefix in autosense mode. With an explicit base 16 the parse stops at the 'x' and fails, so the expedited stack bytes are never seeded into the L1 memory cache.
Restore BASE_AUTOSENSE here, matching the documented format for this key (0x hex, 0 octal, otherwise decimal). Fixes TestExpeditedStackMemory.py.
>From 2549cc90220a46bee48c1de15013c6b9a9ae1904 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Fri, 24 Jul 2026 09:10:34 -0700
Subject: [PATCH] [lldb] Restore autosense for expedited memory-cache address
parsing
PR #211495 changed the expedited "memory:<addr>=<bytes>" address parse
in SetThreadStopInfo from autosense (radix 0) to explicit base 16.
debugserver sends this address with a "0x" prefix, and
StringRef::getAsInteger only strips that prefix in autosense mode. With
an explicit base 16 the parse stops at the 'x' and fails, so the
expedited stack bytes are never seeded into the L1 memory cache.
Restore BASE_AUTOSENSE here, matching the documented format for this key
(0x hex, 0 octal, otherwise decimal). Fixes the deterministic failure of
macosx/expedited-stack-memory/TestExpeditedStackMemory.py.
---
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 256d87ce99733..724e7f2e71bd8 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2541,7 +2541,7 @@ StateType ProcessGDBRemote::SetThreadStopInfo(StringExtractor &stop_packet) {
std::tie(addr_str, bytes_str) = value.split('=');
if (!addr_str.empty() && !bytes_str.empty()) {
lldb::addr_t mem_cache_addr = LLDB_INVALID_ADDRESS;
- if (!addr_str.getAsInteger(BASE_16, mem_cache_addr)) {
+ if (!addr_str.getAsInteger(BASE_AUTOSENSE, mem_cache_addr)) {
StringExtractor bytes(bytes_str);
const size_t byte_size = bytes.GetBytesLeft() / 2;
WritableDataBufferSP data_buffer_sp(
More information about the lldb-commits
mailing list