[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: proposal
From:       Andreas Pour <pour () mieterra ! com>
Date:       2000-09-11 11:32:54
[Download RAW message or body]

David Faure wrote:
> 
> On Mon, 11 Sep 2000, Andreas Pour wrote :
> >David Faure wrote:
> >
> >[ ... ]
> >
> >>
> >> Yup. I'm thinking about this "don't allow send bugreport if no debug info"
> >> thing in drkonqi, but the problem is that there are 3 levels of debug info
> >> (normal, stripped binaries, -g). I think normal and -g are ok, but how
> >> do I know which one was used ?
> >> #ifndef NDEBUG will only say "-g wasn't used".
> >>
> >> How does one get stripped binaries anyway ? --disable-debug ?
> >
> >Besides using the --disable-debug option, another is running "strip" on
> >the binary after install.   Distros use both methods; in fact I noticed
> >that in the RH > 6.2 the rpm is set up to strip all installed files
> >automatically, w/out the rpm writer/rebuilder doing anything special (or
> >even knowing that this is happening :-(  ).
> 
> Yes, but if they don't use --disable-debug, then they get
> all the debug output in the console when starting an app.
> I doubt any sensible packager would do that.
> 
> >As to how to tell:  well, to generate the gdb backtrace you have to know
> >the file name, right?  If you know that, just run "file" on it, and you
> >will either get:
> >
> >IF STRIPPED:  /bin/ls: ELF 32-bit LSB executable, Intel 80386, version
> >1, dynamically linked (uses shared libs), stripped
> >
> >IF NOT STRIPPED:  /opt/kde2/bin/konqueror: ELF 32-bit LSB executable,
> >Intel 80386, version 1, dynamically linked (uses shared libs), not
> >stripped
> 
> file isn't always installed.

Who's going to have gdb installed that doesn't have file installed? 
Also, as an alternative to 'file' you can use 'objdump'.  'objdump -g
EXECUTABLE' will print out a ton of stuff if it hasn't been stripped,
and something like:

objdump: a.out: no symbols
objdump: a.out: no recognized debugging information

if it's been stripped.

If you are clever you can use this too to figure out if -g was used to
compile; you will get debugging symbols for the file.  But even if it
was compiled normally there is a bunch of stuff output, and I haven't
bothered figuring out how to systematically tell the difference.

Ciao,

Andreas Pour

http://www.kde.com/ :  Everything KDE
http://apps.kde.com/:  The Latest in KDE Applications

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic