diff options
Diffstat (limited to 'src/debug/createdump/threadinfo.cpp')
-rw-r--r-- | src/debug/createdump/threadinfo.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/debug/createdump/threadinfo.cpp b/src/debug/createdump/threadinfo.cpp index e2c10fc4b7..35a4f0d4cd 100644 --- a/src/debug/createdump/threadinfo.cpp +++ b/src/debug/createdump/threadinfo.cpp @@ -145,21 +145,19 @@ ThreadInfo::GetThreadStack(const CrashInfo& crashInfo, uint64_t* startAddress, s *startAddress = m_gpRegisters.rsp & PAGE_MASK; *size = 4 * PAGE_SIZE; - for (const MemoryRegion& mapping : crashInfo.OtherMappings()) - { - if (*startAddress >= mapping.StartAddress() && *startAddress < mapping.EndAddress()) + const MemoryRegion* region = CrashInfo::SearchMemoryRegions(crashInfo.OtherMappings(), *startAddress); + if (region != nullptr) { + + // Use the mapping found for the size of the thread's stack + *size = region->EndAddress() - *startAddress; + + if (g_diagnostics) { - // Use the mapping found for the size of the thread's stack - *size = mapping.EndAddress() - *startAddress; - - if (g_diagnostics) - { - TRACE("Thread %04x stack found in other mapping (size %08lx): ", m_tid, *size); - mapping.Print(); - } - break; + TRACE("Thread %04x stack found in other mapping (size %08lx): ", m_tid, *size); + region->Trace(); } } + } void |