[lldb-dev] New linux process plugin

Stephen Wilson wilsons at start.ca
Fri Jul 23 21:12:42 PDT 2010


Hi William,

Thanks so much for testing!  Very much appreciated!

Applied both patches as r109327.

Take care,
Steve

William Lynch <wlynch at wlynch.cx> writes:

> The previous patch will allow lldb to finish building. However, on 10.5, I get
> a linker error at startup time. It's missing source/Plugins/Process/MacOSX-User
> in lldb.dylib. However, at least on my machine, that subdirectory needs some
> work to properly compile.
>
> Index: source/Plugins/Makefile
> ===================================================================
> --- source/Plugins/Makefile (revision 109318)
> +++ source/Plugins/Makefile (working copy)
> @@ -18,7 +18,8 @@
>  
>  ifeq ($(HOST_OS),Darwin)
>  DIRS += DynamicLoader/MacOSX-DYLD ObjectContainer/Universal-Mach-O \
> - ObjectFile/Mach-O Process/gdb-remote Process/Utility SymbolVendor/MacOSX
> + ObjectFile/Mach-O Process/gdb-remote Process/Utility SymbolVendor/MacOSX \
> + Process/MacOSX-User
>  endif
>  
>  ifeq ($(HOST_OS),Linux)
>
>
> On Fri, Jul 23, 2010 at 10:37 PM, William Lynch <wlynch at wlynch.cx> wrote:
>
>     A very small patch which should help building on Darwin:
>
>     Index: lib/Makefile
>     ===================================================================
>     --- lib/Makefile (revision 109318)
>     +++ lib/Makefile (working copy)
>     @@ -65,7 +65,7 @@
>                    lldbPluginObjectFileMachO.a \
>                    lldbPluginProcessGDBRemote.a \
>                    lldbPluginUtility.a \
>     -              lldbSymbolVendorMaxOSX.a
>     +              lldbPluginSymbolVendorMacOSX.a
>      endif
>      
>      ifeq ($(HOST_OS),Linux)
>
>
>     On Fri, Jul 23, 2010 at 9:19 PM, Stephen Wilson <wilsons at start.ca> wrote:
>
>         Hi all,
>
>         I just pushed the new linux process plugin.  A few notes:
>
>         I updated the makefiles to build only under linux.  I do not know if
>         this will build on a mac.  Perhaps someone can try and let me know the
>         result.
>
>         Only very basic breakpoint/step-over functionality is present.  For
>         example, we cannot resolve pending breakpoints yet, so one must set
>         breakpoints with the debugee stopped on entry.
>
>         Only x86_64 at the moment (will add i386 soon).
>
>         Here is a simple example of what is working for those who might like to
>         test it out:
>
>         ===
>         --------------------------------------------------------------------------
>         ===
>          > cat ctest.c
>
>           void foo() { return; }
>
>           void bar() { return; }
>
>           int main()
>           {
>               foo();
>               bar();
>               return 0;
>           }
>
>          > lldb ./ctest
>           Current executable set to './ctest' (x86_64).
>           (lldb) r -s
>           Launching '/home/steve/tmp/ctest'  (x86_64)
>           (lldb) Process 0 Launching
>           Process 0 Stopped
>           * thread #1: tid = 0x4789, pc = 0x0000003206200af0, ...
>           (lldb) b s -n foo
>           Breakpoint created: 1: name = 'foo', locations = 1, resolved = 1
>           (lldb) b s -n bar
>           Breakpoint created: 2: name = 'bar', locations = 1, resolved = 1
>           (lldb) p c
>           Resuming process 0
>           (lldb) Process 0 Stopped
>           * thread #1: tid = 0x4789, pc = 0x0000000000400478, ...
>              1
>              2 ->      void foo() { return; }
>              3
>              4         void bar() { return; }
>              5
>           (lldb) p c
>           Resuming process 0
>           (lldb) Process 0 Stopped
>           * thread #1: tid = 0x4789, pc = 0x000000000040047e, ...
>              1
>              2         void foo() { return; }
>              3
>              4 ->      void bar() { return; }
>              5
>              6         int main()
>              7         {
>           (lldb) q
>         ===
>         --------------------------------------------------------------------------
>         ===
>
>
>         It's a start.  Let be know of any issues, comments, advice, etc.
>
>         Thanks!
>         Steve
>         _______________________________________________
>         lldb-dev mailing list
>         lldb-dev at cs.uiuc.edu
>         http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list