[Lldb-commits] [PATCH] D19273: Update Go OS Plugin for newer runtimes
Ryan Brown via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 20 14:49:49 PDT 2016
ribrdb removed rL LLVM as the repository for this revision.
ribrdb updated this revision to Diff 54427.
http://reviews.llvm.org/D19273
Files:
source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
Index: source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
===================================================================
--- source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
+++ source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
@@ -249,8 +249,19 @@
TargetSP target_sp = m_process->CalculateTarget();
if (!target_sp)
return false;
- m_allg_sp = FindGlobal(target_sp, "runtime.allg");
- m_allglen_sp = FindGlobal(target_sp, "runtime.allglen");
+ // Go 1.6 stores goroutines in a slice called runtime.allgs
+ ValueObjectSP allgs_sp = FindGlobal(target_sp, "runtime.allgs");
+ if (allgs_sp)
+ {
+ m_allg_sp = allgs_sp->GetChildMemberWithName(ConstString("array"), true);
+ m_allglen_sp = allgs_sp->GetChildMemberWithName(ConstString("len"), true);
+ }
+ else
+ {
+ // Go 1.4 stores goroutines in the variable runtime.allg.
+ m_allg_sp = FindGlobal(target_sp, "runtime.allg");
+ m_allglen_sp = FindGlobal(target_sp, "runtime.allglen");
+ }
if (m_allg_sp && !m_allglen_sp)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19273.54427.patch
Type: text/x-patch
Size: 1087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160420/b03fa532/attachment.bin>
More information about the lldb-commits
mailing list