From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18928 invoked by alias); 7 Jan 2005 17:06:51 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 18801 invoked from network); 7 Jan 2005 17:06:36 -0000 Received: from unknown (HELO wproxy.gmail.com) (64.233.184.192) by sourceware.org with SMTP; 7 Jan 2005 17:06:36 -0000 Received: by wproxy.gmail.com with SMTP id 58so77348wri for ; Fri, 07 Jan 2005 09:06:36 -0800 (PST) Received: by 10.54.45.44 with SMTP id s44mr223456wrs; Fri, 07 Jan 2005 09:06:36 -0800 (PST) Received: by 10.54.8.52 with HTTP; Fri, 7 Jan 2005 09:06:35 -0800 (PST) Message-ID: <7ac1e90c05010709061e9c51a8@mail.gmail.com> Date: Fri, 07 Jan 2005 17:06:00 -0000 From: Bahadir Balban Reply-To: Bahadir Balban To: gcc-help@gcc.gnu.org Subject: debug flags versus binary size Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2005-01/txt/msg00035.txt.bz2 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