Re: [Lldb-commits] [PATCH] Add an OperatingSystem plugin to support goroutines

2014-10-20 Thread jingham
Greg should comment on way you're populating the Memory threads, etc.  That was 
his code (used mostly by the OS X kernel folks to turn kernel thread 
activations into lldb threads...)  At present you can only enable/disable the 
OS plugins when the target is created, but I haven't looked into how hard that 
would be to change.

But anyway most of the extensions (like the JIT loader and the ASAN plugin) do 
their initialization work by inserting some callback in:

Process::ModulesDidLoad

which gets called every time a new shared library is loaded.  You can just 
check the module list you were passed and if it contains the symbol you are 
looking for, run your Init method.  At some point we should create some formal 
process where plugins can register new module loaded handlers rather than 
just jamming them in here by hand.  If you are feeling ambitious, have a go!  
Otherwise, just do what everybody else does...

Jim

 On Oct 20, 2014, at 12:32 PM, Ryan Brown rib...@google.com wrote:
 
 This is a first version of an os plugin for go supporting the 1.4 go runtime.
 I'm not sure what the best way to enable/disable this plugin is. I tried 
 checking for the go runtime symbols when the plugin is created, but it 
 appears the symbols aren't loaded until later.
 It would also be desirable to enable/disable the os plugin threads after the 
 process has started, but I'm not sure how to implement that.
 
 http://reviews.llvm.org/D5871
 
 Files:
  lldb.xcodeproj/project.pbxproj
  source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
  source/Plugins/OperatingSystem/Go/OperatingSystemGo.h
  source/lldb.cpp
 D5871.15150.patch___
 lldb-commits mailing list
 lldb-commits@cs.uiuc.edu
 http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] Add an OperatingSystem plugin to support goroutines

2014-10-20 Thread Jim Ingham
Greg should comment on way you're populating the Memory threads, etc.  That was 
his code (used mostly by the OS X kernel folks to turn kernel thread 
activations into lldb threads...)  At present you can only enable/disable the 
OS plugins when the target is created, but I haven't looked into how hard that 
would be to change.

But anyway most of the extensions (like the JIT loader and the ASAN plugin) do 
their initialization work by inserting some callback in:

Process::ModulesDidLoad

which gets called every time a new shared library is loaded.  You can just 
check the module list you were passed and if it contains the symbol you are 
looking for, run your Init method.  At some point we should create some formal 
process where plugins can register new module loaded handlers rather than 
just jamming them in here by hand.  If you are feeling ambitious, have a go!  
Otherwise, just do what everybody else does...

Jim

http://reviews.llvm.org/D5871



___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits