Bug 143820 - Checking programs that have /bin/sh wrapper scripts is inconvenient
Summary: Checking programs that have /bin/sh wrapper scripts is inconvenient
Status: RESOLVED DUPLICATE of bug 148932
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.2.3
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-04 05:24 UTC by Stephen McCracken
Modified: 2009-06-29 09:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen McCracken 2007-04-04 05:24:36 UTC
Version:           3.2.3 (using KDE KDE 3.5.6)
Installed from:    RedHat RPMs
OS:                Linux

I frequently wish to run valgrind on applications that have long and complicated /bin/sh wrapper scripts.  Typically, the wrapper scripts call lots of utility programs (uname/sed/awk/find/...) before finally executing the main executable.  I want valgrind to run only on the main executable, not the utility programs.  However, --trace-children=yes will pick up everything, which slows things down and spews uninteresting output.

The final invocation usually falls into one of the following types:

  # direct exec
  exec $COMPUTED_PATH/main_exe

  # extra eval for arg splicing
  eval exec $COMPUTED_PATH/main_exe $some_args $more_args

  # just run a subprocess
  $COMPUTED_PATH/main_exe

Currently (vg 3.2.3), without --trace-children=yes, valgrind does not trace into main_exe for any of these cases.  If possible, I'd like to see the first two fixed so that valgrind can automatically follow the "exec" calls.  For the final case, perhaps there could be a new valgrind option to specify by name which children to trace, e.g:

   --trace-children-named=main_exe
Comment 1 Nicholas Nethercote 2009-06-29 09:52:01 UTC

*** This bug has been marked as a duplicate of bug 148932 ***