On Tue, 9 Jan 2007, Roland Mainz wrote:

> James Carlson wrote:
> > Roland Mainz writes:
> > > > So, create your own project-related environment variable and use that
> > > > in the makefiles.
> > >
> > > Umpf... that's exactly what I'd like to avoid: Create yet another
> > > project-specific debugging variable. IMHO it may be nice to have one
> > > switch for all projects within OS/Net...
> [snip]
> > I haven't really encountered a need for build-time enabling of special
> > debug features that have a more substantial or system-wide support
> > infrastructure than that.  I guess your mileage will vary, so if you
> > see an obvious gap here, feel free to propose something more concrete.
>
> AFAIK the "obvious gap" is a lack of a global switch which says "compile
> everything with -g". I've spend a couple of days now with finding a
> problem with |posix_spawn()| and this was a great sightseeing-tour
> through libshell, libast, libc (needed to BFU the system), libnsl
> (needed to BFU the system), libsecdb.so (skipped BFU and only use
> tar|tar to clobber the file) and finally libsocket (ahhgrrlll...
> xx@@@!!... ;-( ).
>
> After THAT experience I really wish I were smarter and just compiled
> everything in the tree with "-g". That would have saved me lots of pain
> (the actual problem is a race-condition when a shell creates a pipe
> chain and uses |posix_spawn()| to create the process group leader
> (short: Debugging-horror)).
>
> Therefore it would be nice to have a general purpose "catch all" switch
> in "bldenv" which compiles the entire tree in a way that debuggers like
> dbx allow source-level debugging (which doesn't work for optimized code
> (well, it would be possible as seen in Unicos where the debugger allows
> source-level debugging of optimized code)), e.g. use "-g" (or even "-g
> -xs") and disable "-xO[0-5]" ...

But if you're trying to find a race condition and you recompile the code
using different compiler options - you're no longer debugging the original
code!  This is the exact problem that DTrace is designed to solve.

Regards,

Al Hopper  Logical Approach Inc, Plano, TX.  [EMAIL PROTECTED]
           Voice: 972.379.2133 Fax: 972.379.2134  Timezone: US CDT
OpenSolaris.Org Community Advisory Board (CAB) Member - Apr 2005
             OpenSolaris Governing Board (OGB) Member - Feb 2006
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to