[Lldb-commits] [lldb] r267048 - Update Go OS Plugin for newer runtimes.
Ryan Brown via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 21 13:57:28 PDT 2016
Author: ribrdb
Date: Thu Apr 21 15:57:28 2016
New Revision: 267048
URL: http://llvm.org/viewvc/llvm-project?rev=267048&view=rev
Log:
Update Go OS Plugin for newer runtimes.
Differential Revision: http://reviews.llvm.org/D19273
Modified:
lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
Modified: lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp?rev=267048&r1=267047&r2=267048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp Thu Apr 21 15:57:28 2016
@@ -249,8 +249,19 @@ OperatingSystemGo::Init(ThreadList &thre
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)
{
More information about the lldb-commits
mailing list