Bug 63318 - [GTK] Add more debug options to compilation
Summary: [GTK] Add more debug options to compilation
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
: 58773 (view as bug list)
Depends on:
Reported: 2011-06-24 01:36 PDT by Carlos Garcia Campos
Modified: 2011-06-27 01:55 PDT (History)
1 user (show)

See Also:

Patch (3.52 KB, patch)
2011-06-24 01:42 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-06-24 01:36:34 PDT
Currently --enable-debug option (used by debug builds) include the following:
 - Add -g flag to compile with debug symbols
 - Disable compiler optimizations
 - Disable fast malloc
 - Compile with deprecated flags
 - Other debug features: assertions enabled, some debug code, etc.

Compiler optimizations and fast malloc can be enabled/disabled when debug is not enabled, but all other options depends directly on --enable-debug. 

The other day I wanted to debug and assertion, but I didn't want to build with debug symbols, because it's very slow, so I manually disabled debug symbols and I realized it's really useful to build with debug features enabled but without debug symbols. Martin suggested that building with debug symbols, but without debug features like assertions, would be useful too. So I think we could add options to enabled/disable debug symbols and all other debug features.
Comment 1 Carlos Garcia Campos 2011-06-24 01:42:36 PDT
Created attachment 98473 [details]

The patch adds to options:

 - --enable-debug-symbols: whether to add -g or not
 - --enable-debug-features: whether to define NDEBUG macro and compile with deprecated flags or not

Both options are unconditionally enabled for debug builds.
Comment 2 Martin Robinson 2011-06-24 06:46:05 PDT
Comment on attachment 98473 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=98473&action=review

> configure.ac:1238
> + Enable debug features                                    : $enable_debug_features

Should probably keep the (slow) tag here since it adds assertions and disables TCMalloc.
Comment 3 Carlos Garcia Campos 2011-06-24 08:54:27 PDT
Committed r89675: <http://trac.webkit.org/changeset/89675>
Comment 4 Philippe Normand 2011-06-27 01:55:05 PDT
*** Bug 58773 has been marked as a duplicate of this bug. ***