Linux fastdebug build with debug info

Hiroshi Yamauchi yamauchi at
Wed May 20 10:58:48 PDT 2009

Hi David,

Nice talking to you after a while!

On Wed, May 20, 2009 at 12:00 AM, David Holmes - Sun Microsystems
<David.Holmes at> wrote:
> Hi Hiroshi,
> The flags are set in gcc.make and should then be picked up by each
> <target>.make file. But in this case it appears that the linux
> fastdebug.make is missing the instructions to do that! Looks like a bug to
> me!

Yes. That's what I thought. The fastdebug build should have some debug
option baked in either -g or -gstabs.

> Regarding use of -g, hence the settings and comments from gcc.make:
> # Use the stabs format for debugging information (this is the default
> # on gcc-2.91). It's good enough, has all the information about line
> # numbers and local variables, and is only about 16M.
> # Change this back to "-g" if you want the most expressive format.
> # (warning: that could easily inflate to 150M!)
> # Note: The Itanium gcc compiler crashes when using -gstabs.
> DEBUG_CFLAGS/ia64  = -g
> DEBUG_CFLAGS/amd64 = -g
> DEBUG_CFLAGS += -gstabs
> endif
> There's a history here about the size of the lib when -g is used, hence the
> -gstabs default.

OK. I can see the size issue. In my local builds, is about
100M for a fastdebug (with -g) and 160M for a full debug build whereas
the product build's is about 9MB. I think I can tolerate the big size
for VM debugging purposes.

I have a local change to force the use of -g probably for the better
format of debug info.

Is there a history about the Linux fastdebug build not having -g or -gstabs?


> David
> Hiroshi Yamauchi said the following on 05/20/09 14:32:
>> Hi,
>> If I build a fastdebug VM on Linux (based on openjdk6 b11), the
>> does not get the debug info (symbols and line numbers used
>> mainly in gdb). If I copy'n'paste the following lines from jvmg.make
>> to fastdebug.make (under hotspot/build/linux/makefiles), I get the
>> debug info.
>> # The following lines were copied from jvmg.make
>> # Compiler specific DEBUG_CFLAGS are passed in from gcc.make,
>> sparcWorks.make
>> Is this valid?
>> Is there any historic reason why -g isn't used in the fastdebug build
>> on Linux (such as conflict between -O and -g)?
>> I think the fastdebug should have -g by definition.
>> Thanks,
>> Hiroshi

More information about the hotspot-dev mailing list