As Jim sais, LLDB is designed to be shared between many programs, so the best thing you can probably do is to adopt it in your program. Properly handing multi-threaded debugging is a tough issue that has taken a large portion of our development time and I wouldn't recommend trying to reproduce that logic.
To get started, you would build lldb locally on your machine and then link against the LLDB.framework that results from the build. As Jim also said, you can then look at Driver.cpp as a model of how you would interact with the debugger with an event loop. Feel free to ask question if/when you have more. Greg Clayton On Feb 19, 2011, at 9:32 AM, Tomas Nemec wrote: > Hello, > sorry to bother, I am looking for advise on OS X (Mach) debugging and since > there are not many examples I figured this would be the best place to ask. > > I am developing a graphical debugger for OSX - currently it runs as a GDB > frontend. This is very cumbersome and slow though. > I would like to either create my own mini debugger as a backend or possibly > embed lldb. > My mini debugger works but I found out that it is not reliable when trying to > debug a multi-threaded target when more than 1 thread hits a breakpoint. > Trying to single step then sometimes works and sometimes causes the target to > exit... > Could someone give me some pointers or help me if I share my code with you? > (my code is quite small and not difficult to understand) > Also could someone tell me whether it is difficult to embed lldb as a backend > into my Cocoa frontend? Where should I start? > > Many thanks, > Kurt _______________________________________________ > lldb-dev mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev _______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
