Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 202054 Details for
Bug 280846
www-client/mozilla-firefox-3.5.2 doesn't run
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Shell script to run firefox under gdb
RunBugs.sh (text/plain), 7.46 KB, created by
Robert Bradbury
on 2009-08-23 16:39:47 UTC
(
hide
)
Description:
Shell script to run firefox under gdb
Filename:
MIME Type:
Creator:
Robert Bradbury
Created:
2009-08-23 16:39:47 UTC
Size:
7.46 KB
patch
obsolete
># RunBugs.sh - Run "development" firefox with bug filing bookmarks > >CURDIR=`pwd` # Should be current directory > >FIREFOXDIR=""; # usually /usr/local/lib/firefox-3.0.12pre, e.g. BonEcho >for PC in local LOCAL LCL UNKNOWN >do > if test "$PC" = UNKNOWN; then echo "Missing firefox directory"; exit 1; fi > FIREFOXDIR=/usr/$PC/lib/firefox-3.0.12pre > if test -d $FIREFOXDIR; then break; fi >done > >FIREFOX=$FIREFOXDIR/firefox-bin >if test ! -x $FIREFOX; then echo "Missing: $FIREFOX"; exit 1; fi > ># MOZ_NO_REMOTE *must* be set to avoid connecting to "running" instance >export MOZ_NO_REMOTE=1 # Enable running multiple instances (profiles) >#export NO_EM_RESTART=1 # Don't re-exec firefox-bin > >FFARGS="" >#FFARGS="$FFARGS --safe-mode" # Don't use extensions [RJB: not now] >#FFARGS="$FFARGS --sync" # Use synchronous "X" error reporting (CPU intensive?) >FFARGS="$FFARGS -P "Bugs" -no-remote" > ># Other mozilla environment setable options >#export MOZ_PLUGIN_PATH=${MOZ_PLUGIN_PATH:-/usr/lib/nsbrowser/plugins} >export MOZ_PLUGIN_PATH=$FIREFOXDIR/plugins > >export MOZ_DISABLE_IMAGE_OPTIMIZE=1 # don't try to optimize images >export MOZ_DISABLE_PANGO=1 # faster startup if we avoid pango libraries > # But it still loads them? > # unsure if disables certain foreign charsets... > ># Mozilla "NetScape Portable Runtime" tracing >#export NSPR_LOG_MODULES=Widget:2,all:5 >#export NSPR_LOG_MODULES=Widget:4 >#export NSPR_LOG_FILE=$XRE_PROFILE_PATH/nsprlog.txt > >############################################################################## ># setLDvar function - set and export LD_* variables before execing program >function setLDvar { > # Preloaded shared libraries - to avoid LD_LIBRARY_PATH order... > # export LD_PRELOAD=/usr/local/lib/firefox-1.5.0.4/libxpcom_core.so > > # Hack to resolve library load searching problem!!! RJB 081209 > # Prob 1: /usr/local/lib/firefox-3.0.6pre/firefox-bin: symbol lookup error: /opt/libdbg/libgtk-x11-2.0.so.0: undefined symbol: _nss_files_getaliasent_r > # Prob 2: /usr/local/lib/firefox-3.0.6pre/firefox-bin: symbol lookup error: /opt/libdbg/libgtk-x11-2.0.so.0: undefined symbol: _nss_dns_gethostbyaddr_r > ># export LD_PRELOAD=/usr/local/lib/libnss_files.so.2Lw ># -rwxr-xr-x 1 root root 159038 Apr 20 2008 /usr/local/lib/libnss_files-2.7.so ># lrwxrwxrwx 1 root root 17 Apr 20 2008 /usr/local/lib/libnss_files.so -> libnss_files.so.2 ># lrwxrwxrwx 1 root root 19 Apr 20 2008 /usr/local/lib/libnss_files.so.2 -> libnss_files-2.7.so ># gives ERROR: ld.so: object '/usr/local/lib/libnss_files.so.2Lw' from LD_PRELOAD cannot be preloaded: ignored. > > # Hack fix: preload libraries required... > ##export LD_PRELOAD=/lib/libnss_dns-2.8.so:/lib/libnss_files-2.8.so > ## The following line causes segfault in loading the libraries ??? > ##export LD_PRELOAD=/opt/libdbg/libnss_dns-2.8.so:/opt/libdbg/libnss_files-2.8.so > ##export LD_PRELOAD=/lib/libnss_dns-2.9.so:/lib/libnss_files-2.9.so > > # Shared library loading tracing -- impacts output in LD_DEBUG_OUTPUT file > #export LD_DEBUG=all # everything > #export LD_DEBUG=libs,files,versions,reloc,bindings # everything but symbols > #LD_DEBUG=libs,files,versions # not all or reloc|bindings > #LD_DEBUG_OUTPUT=$XRE_PROFILE_PATH/ldshl.log > > unset LD_LIBRARY_PATH > LD_LIBRARY_PATH=$FIREFOXDIR # Start with libraries "with" firefox > ># #if one wants debugging SYSDBGLIBDIR *must* come before /lib and /usr/lib ># if test "$LIBDBG" = 1; then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SYSDBGLIBDIR; fi ># # LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SYSDBGLIBDIR ># ># # Now add /lib and /usr/bin if not present ># LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib ># ># if test -d /usr/lib/nspr # Add NSPR libs (if not in $FIREFOXDIR or $SYSDBGLIBDIR) ># then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nspr; fi ># ># if test -d /usr/lib/nss # Add NSS libs (if not in $FIREFOXDIR or $SYSDBGLIBDIR) ># then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nss; fi ># # Now, very important, add any other directories for "debug" libraries, glib, gdk, etc. ># ># ># # Add "standard" system libraries to shared library search path (added earlier!) ># # LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/lib > > # export load library information > export LD_LIBRARY_PATH LD_DEBUG LD_DEBUG_OUTPUT >} >############################################################################## > ># This is needed for: libjemalloc.so >unset LD_LIBRARY_PATH > >############################################################################## ># Got burnt several times for not having large enough core dump limit. ># Prevent limits on core dump sizes!!! ># Required to prevent gdb from complaining about unrecognized core files ># when core file size is truncated... ># Kernel & GDB should recognize alternate core file with stack before data... > >#COREDIR=/root3/tmp/CORES # Place with enough space for core dumps >#COREDIR=/bck/CORES # Place with enough space for core dumps >#COREDIR=/bck2/tmp/CORES # Place with enough space for core dumps >COREDIR=/media/tmp # Should have lots of space... >if test ! -w $COREDIR >then echo "core directory $COREDIR is not writable"; exit 1 >fi >if ! cd $COREDIR >then echo "Could not change to directory $COREDIR"; exit 1; fi > >CORELIMIT=3000000 # 3GB (3000MB) core file allowed >COREREQSZ=$CORELIMIT ># may need to adjust to allow for CD size (750MB) addition < $CORELIMIT*1000 >#COREREQSZ=`expr $COREREQSZ + 750000` > >FREESPACE=`df -k $COREDIR | sed -n '$s/[^ ]* *[^ ]* *[^ ]* *\([^ ]*\).*/\1/p'` >echo "Req: $COREREQSZ Avail: $FREESPACE" >if test $COREREQSZ -gt $FREESPACE >then > echo "Required core file size $COREREQSZ is less than space available $FREESPACE" > echo "Free some space on the $COREDIR drive" > exit 1 >fi >if ! ulimit -Sc $CORELIMIT # xMB core file allowance >then > echo "Core file size ulimit could not be set to $CORELIMIT" > exit 1 >fi > >#echo "FFDBG=$FFDBG LIBDBG=$LIBDBG FFARGS=$FFARGS"; exit > >if test "$FFDBG" = "1" -o "$DEBUG" = "1" >then > echo "XRE_PROFILE_PATH=$XRE_PROFILE_PATH" > echo "FIREFOX=$FIREFOX" > echo "To start firefox in gdb: run $FFARGS" > gdb $FIREFOX 2>&1 | tee $CURDIR/firefox.dbg > # &1 | tee firefox.dbg >else > # Now, print information about the "final" firefox execution (before setting LD_*) > ls -l $FIREFOX > echo "XRE_PROFILE_PATH=$XRE_PROFILE_PATH" > > setLDvar # set LD_* variables > #export LD_LIBRARY_PATH=$FIREFOXDIR:/opt/libdbg > #echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" > # set; exit 1 # uncomment if you want to see environment variables > > GDBCMDS=$CURDIR/gdbcmds.$$ > echo > $GDBCMDS " > # no messages regarding library loading > set verbose off > # Answer "y" to questions to allow breakpoint setting in shared libraries > # set confirm on -- doesn't work? > # log the output to gdb.trc > set logging file gdb.trc.$$ > set logging on > # set program program arguments > set args $FFARGS > # handle interrupt processing > handle SIGHUP print > handle SIGTERM print > handle SIGPIPE nostop print pass > handle SIGALRM stop print nopass > break main > # printf "Running program\n" > run > # Debug Gtk/Gdk/Glib error locations > # glib breakpoints need to be set after glib shared library loaded > # break g_logv > # commands > # backtrace > # info reg > # end > # info break > # continue >" > > echo "Firefox args: $FFARGS" > gdb -x $GDBCMDS $FIREFOX 2>&1 | tee $CURDIR/firefox.trc > > # $FIREFOX $FFARGS >firefox.trc 2>&1 > # Really want to run Firefox in background, wait 10-20 minutes for restart to > # complete, then run "gdb $FIREFOX $!" > STATUS=$? > echo "Firefox exit status: $STATUS" > echo "Curdir = " `pwd` >fi >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 280846
:
200654
| 202054