gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gdb] Re: debug level versus size


From: Nevo Hed
Subject: [Gdb] Re: debug level versus size
Date: Fri, 07 Jan 2005 16:05:36 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910


Hi,

Besides the '-g' the rest is depending on your configure scripts and other stuff
not explicitly related to GDB.

I would investigate the codebase and see why those other defines cause such explosion in size. If you just need the stack - I would just set the -g and disable optimization Additionally, if you have a clue as to what area your problem is - you could just recompile that library or even just that object file with debug/no-opt and so your size increase will be minimal

 -Nevo

Hi,
I have a buggy executable and to figure out the bug I needed to use a
stack trace. For this purpose I compiled my application with debug
support but the exe size is 94,5MB compared to optimised one that is
7,4MB. Unfortunately I cannot run it now due to insufficient memory.

What flags/configure options should I use to get an exe capable of
giving a meaningful stack trace with a smaller binary size?

I used the following configure options for the large debug-enabled binary:

# code generation options (optimize for size)
#ac_add_options --enable-optimize=-Os
#ac_add_options --enable-strip
#ac_add_options --disable-debug
ac_add_options  --enable-debug
#ac_add_options --enable-reorder
#ac_add_options --enable-elf-dynstr-gc

#ac_add_options --disable-dtd-debug
ac_add_options --enable-dtd-debug                   # ENABLE DTD DEBUG
ac_add_options --disable-logging
ac_add_options --disable-tests

# enable static build (exists for both debug and non-debug)
ac_add_options --disable-shared
ac_add_options --enable-static

which resulted in the following flags during compilation:
-DDEBUG -D_DEBUG -D_DEBUG_root -D_TRACING and -g.

Many thanks,
Bahadir








reply via email to

[Prev in Thread] Current Thread [Next in Thread]