================
@@ -5894,8 +5919,28 @@ RNBRemote::GetJSONThreadsInfo(bool
threads_with_valid_stop_info_only) {
thread_dict_sp->AddItem("detailed-binaries-info",
detailed_binary_infos);
}
- }
+ DNBRegisterValue sp_regval;
+ if (DNBThreadGetRegisterValueByID(pid, tid, REGISTER_SET_GENERIC,
+ GENERIC_REGNUM_SP, &sp_regval)) {
+ nub_addr_t sp = INVALID_NUB_ADDRESS;
+ if (sp_regval.value.uint64 != INVALID_NUB_ADDRESS) {
+ if (sp_regval.info.size == 4)
+ sp = sp_regval.value.uint32;
+ else if (sp_regval.info.size == 8)
+ sp = sp_regval.value.uint64;
+ }
+ if (sp != INVALID_NUB_ADDRESS) {
+ if (JSONGenerator::ObjectSP obj_sp =
+ DNBProcessMemoryRegionInfo(pid, sp)) {
+ JSONGenerator::ArraySP containing_arr_sp =
+ std::make_shared<JSONGenerator::Array>();
+ containing_arr_sp->AddItem(obj_sp);
+ thread_dict_sp->AddItem("memory-region-info", containing_arr_sp);
----------------
felipepiovezan wrote:
all of this seems duplicated code with the single-thread case in
`SendStopReplyPacketForThread`, let's move this to a helper function and re-use
it in both places
https://github.com/llvm/llvm-project/pull/202509
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits