Tom Rini wrote:
> On Thu, Oct 12, 2006 at 06:47:34AM -0700, Kevin Hilman wrote:
>> [Sorry for the delayed response, I'm a late comer to the thread, ]
>>
>> Amit S. Kale wrote:
>>> I agree with Tom. KGDB without debug info is more or less unusable on
>>> MIPS  (and most non-x86 architectures).
>> I guess it depends how you define unusable.  gdb/kgdb are perfectly
>> usable on code that is not compiled with -g.  You just don't have
>> symbolic debug.    For some users, this is very useful as the goal is to
>> debug the _actual_ code that runs in production, NOT code compiled with -g.
> 
> Ah, but the same, quite cool IMHO, trick that lets you strip debug info
> off and load it later is what you want, if you're shipping production
> binaries with KGDB enabled.

Hmm..., that implies that a debug binary (-g -O2) which has been
stripped is the same as optimized binary (some form of -O2).  I'm not
sure that is always true.  Any compiler experts to jump in?

I believe that when using -g with -O2, the compiler _may_ lower the
optimization so that -g -O2 stripped is not always the same as -O2.
Unfortunately, I don't have a concrete way to demonstrate this.  A
kernel compile test on x86 shows that a -g -O2 kernel stripped and an
-O2 kernel stripped are the same size, but that may just mean that the
default kernel doesn't trigger any of these optimizations.  (or it could
mean that I'm crazy and don't know what I'm talking about.  :)

In any case, I'm still not sure why there's so much resistance a patch
to giving the user the option.  Enabling kgdb will still enable
DEBUG_INFO by default, but the option is there for those who wish to
turn it off.

Kevin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to