You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by Apache subversion Wiki <co...@subversion.apache.org> on 2013/01/23 21:26:32 UTC

[Subversion Wiki] Update of "DebuggingTips" by BenReser

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Subversion Wiki" for change notification.

The "DebuggingTips" page has been changed by BenReser:
http://wiki.apache.org/subversion/DebuggingTips?action=diff&rev1=4&rev2=5

Comment:
Show how to pass args to svn, show abbreviations in using libtool, and note how libtool works and why you need relative or absolute paths.

  Re-set $SHELL so shelling out from gdb will start your $SHELL, rather than sh.
  
  {{{
-   libtool --mode=execute env SHELL=$SHELL gdb ./subversion/svn/svn
+   libtool --mode=execute env SHELL=$SHELL gdb -args ./subversion/svn/svn up -r 2
  }}}
+ 
+ The execute mode can be abbreviated to make the command a little quicker to type:
+ {{{
+   libtool e env SHELL=$SHELL gdb -args ./subversion/svn/svn up -r 2
+ }}}
+ 
+ Note that the above commands above must provide an absolute or relative path to a libtool wrapper script which wraps the executable you want to run.  Even if the path to the script is on your PATH it will not work because libtool scans each argument to detect if it is a libtool wrapper script.  When it finds an argument that is a libtool wrapper script it then sets the environment that the script would have and replaces the argument with the path to actual executable the script wraps.  Since bare filenames on your path will not be resolved to absolute paths till the shell goes to execute them, it won't detect these scripts and won't set the environment up properly and gdb will complain that the script is not an executable.
+   
  '''''Emacs: '''''
  
  Emacs 24.1.1 can run gdb with libtool inside gdb mode: