Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I run a debugger on dynamic Subversion binaries without having to install them?

0
10 Posted

How do I run a debugger on dynamic Subversion binaries without having to install them?

0

Before the make install step on unix-y systems, dynamically built “executables” in a Subversion source tree are actually libtool-generated shell scripts which re-link and run the real binary. As shown below, this complicates debugging: subversion$ gdb subversion/svn/svn … “/path/to/subversion/subversion/svn/svn”: not in executable format: File format not recognized While this can be worked around by building using the –disable-shared argument to configure to statically link the binaries, or installing them and pointing your debugger at the installed version, it’s often necessary or more expedient to be able to debug them right within your source tree. To do so, edit the last exec statement in the shell script to run the real binary in your debugger. With gdb, this amounts to replacing exec “$progdir/$progname” with exec gdb –args “$progdir/$progname”. This trick is also very useful when applied to the libtool-generated shell scripts for the white box tests.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.