Make ptrace-based launchers able to handle --help, --version etc.
Problem is that --help etc are handled by the tool exe.  But a
ptrace-based launch scheme can't run "no program" if the user just
types "valgrind --help" because the launcher depends on starting the
client first and only then attaching valgrind to it using ptrace.  So
instead provide a dummy do-nothing program to run when no program is
specified.  m_main notices this and acts as if there really had been
no program specified.

This has no effect at all on Linux/ELF program launching.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6653 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_initimg/initimg-aix5.c b/coregrind/m_initimg/initimg-aix5.c
index 5033be7..cf02dac 100644
--- a/coregrind/m_initimg/initimg-aix5.c
+++ b/coregrind/m_initimg/initimg-aix5.c
@@ -96,6 +96,10 @@
    IIFinaliseImageInfo iifii;
    VG_(memset)( &iifii, 0, sizeof(iifii) );
 
+   /* this can happen, if m_main decides to NULL it out */
+   if (VG_(args_the_exename) == NULL)
+      VG_(err_missing_prog)();
+
    vg_assert( iicii.toolname );
    pltool_len = VG_(strlen)( VG_(libdir) ) 
                 + 1 /*slash*/