Hi,

Due to a floating point exception, my minimo executable crashes. So to
find out about the problem I attempted to build a debugged version of
it. However the executable size is 94MB compared to the optimised one
that is 7,4MB. Accordingly, it doesn't run on my 128MB arm board.

How should I compile it so that I can get a meaningful stack trace,
yet have a smaller executable?

The correspondant debug flags that I see during compilation are
-DDEBUG -D_DEBUG -D_DEBUG_root -D_TRACING and -g. If I only had
-D_TRACING for example, would that be enough? Could I do this by
easily changing the mozconfig?

Here are the relevant flags that I use in my mozconfig file:

# 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
ac_add_options --disable-shared
ac_add_options --enable-static


And here's the whole mozconfig file:

MINIMO=1
mk_add_options MINIMO=1

ac_add_options --cache-file=/dev/null

# cross compile for arm-linux
PATH=/opt/toolchain/bin:/opt/toolchain/arm-linux/local/bin:$PATH
CROSS_COMPILE=1
LIBIDL_CONFIG=/opt/toolchain/arm-linux/local/bin/libIDL-config-2
HOST_LIBIDL_CONFIG=/usr/bin/libIDL-config
ac_add_options --target=arm-linux
ac_add_options --x-includes=/opt/toolchain/arm-linux/local/X11R6/include
ac_add_options --x-libraries=/opt/toolchain/arm-linux/local/X11R6/lib

# use GTK+-2 widget set with XFT font rendering
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --disable-freetype2

# disable XUL support to reduce codesize
ac_add_options --disable-xul

# enable minimal profile support
ac_add_options --disable-profilesharing
ac_add_options --disable-profilelocking
ac_add_options --enable-single-profile

# disable features and skip various build steps
ac_add_options --disable-accessibility
ac_add_options --disable-composer
ac_add_options --enable-plaintext-editor-only
ac_add_options --disable-mailnews
ac_add_options --disable-ldap   
ac_add_options --disable-postscript
ac_add_options --disable-mathml
ac_add_options --disable-jsd
ac_add_options --disable-jsloader
ac_add_options --disable-installer
ac_add_options --disable-xpinstall
ac_add_options --disable-xpfe-components
ac_add_options --disable-xprint
ac_add_options --disable-necko-disk-cache

# configure necko to allocate smaller network buffers
ac_add_options --enable-necko-small-buffers

# disable debug logging and tests

#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

# build crypto module (PSM + NSS)
ac_add_options --disable-crypto

# build minimal set of protocol handlers
ac_add_options --enable-necko-protocols=http,file,res,jar

# build minimal set of image decoders
ac_add_options --enable-image-decoders=png,gif,jpeg

# 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

# enable static build
ac_add_options --disable-shared
ac_add_options --enable-static

# remove link dependency on libstdc++.so
LIBS=-lsupc++
CXX=arm-linux-gcc

Many thanks,
Bahadir
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to