On Tue, May 16, 2000 at 08:02:25AM -0500, David Faure wrote:
> On Tue, May 16, 2000 at 12:10:31PM +0200, David Odin wrote:
> > On Mon, May 15, 2000 at 09:05:51PM -0400, Scott Balmos wrote:
> > > Good evening everyone,
> > > 
> > > While this may seem a rather odd question... It seems alarming to me that my 
> > > system (running 7.1 Beta 2) loves to idle around 185 megs when everything's 
> > > all and done loaded up. That's with MySQL, Apache, blah blah blah... loaded, 
> > > and X alone chewing 60 megs.
> > > 
> > > Does this seem even *REMOTELY* possible? I imagine it might, with all the 
> > > binaries probably having debugging symbols in them.
> > > 
> > > On a tangent to that question, what part of the filesystem is it *NOT* safe 
> > > to use "strip" on? If it is the debugging symbols that are the problem, then 
> > > I'd might as well strip them out save for KDE 2. :)
> > > 
> >    Ahem. Debugging symbols are used... by a debugger only. There are NEVER
> > loaded into memory.
> 
> Interesting... you mean that compiling with debugging symbols
> only takes more space on the hard disk, but doesn't use more memory ?
> Never realised that.
>
   Sure. Bebug segment simply aren't being loaded since they're not usefull to the
program to run. That's why the debugging information aren't saved in 'core' file.

  You can see that with this:

[dindinx@lyon1-37-205 test]$ cat bug.c
a(){*(char*)0=1;}
main(){a();}
[dindinx@lyon1-37-205 test]$ gcc bug.c -g
[dindinx@lyon1-37-205 test]$ ./a.out
Erreur de segmentation (core dumped)
[dindinx@lyon1-37-205 test]$ gdb a.out core -q
Core was generated by `./a.out'.
Program terminated with signal 11, Erreur de segmentation.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  a () at bug.c:1
1       a(){*(char*)0=1;}
(gdb) quit
[dindinx@lyon1-37-205 test]$ strip a.out
[dindinx@lyon1-37-205 test]$ gdb a.out core -q
(no debugging symbols found)...
warning: exec file is newer than core file.
Core was generated by `./a.out'.
Program terminated with signal 11, Erreur de segmentation.
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
#0  0x80483b7 in __libc_start_main ()
(gdb)

  See? The core file is the same for the two invocation of gdb.
In the first invocation gdb finds debugging information in a.out.
In the second one, it cannot, since a.out is stripped.

So, no debugging information is in the core file, and so no debugging
information were in the memory.
>
> (Well it also takes more time to compile the stuff, I guess).
> 
  Yes, certainly.


                 DindinX

-- 
  [EMAIL PROTECTED]         HF Team

Reply via email to