diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-04-30 16:43:41 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-04-30 16:43:41 -0400 |
commit | b7b8900677fad295a637912a3254e03c0758939e (patch) | |
tree | 9a3f7261e72fa6ea0d801c249c0fb7d4db0f556b /buildrun.cxx | |
parent | 3ba2eb82cafa938c1c3f7ef9d2da06912a49d8e0 (diff) | |
download | systemtap-steved-b7b8900677fad295a637912a3254e03c0758939e.tar.gz systemtap-steved-b7b8900677fad295a637912a3254e03c0758939e.tar.xz systemtap-steved-b7b8900677fad295a637912a3254e03c0758939e.zip |
add verboser strerrors if posix_spawn failed
* buildrun.cxx (run_make_cmd, kernel_built_uprobes,
copy_uprobes_symbols, run_pass, make_typequery_umod):
Print strerror after a failed stap_system() if verbose.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r-- | buildrun.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/buildrun.cxx b/buildrun.cxx index 14c6a395..bbef1def 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -63,7 +63,8 @@ run_make_cmd(systemtap_session& s, string& make_cmd) if (s.verbose > 1) clog << "Running " << make_cmd << endl; rc = stap_system (make_cmd.c_str()); - + if (rc && s.verbose > 1) + clog << "Error " << rc << " " << strerror(rc) << endl; return rc; } @@ -232,6 +233,8 @@ kernel_built_uprobes (systemtap_session& s) string grep_cmd = string ("/bin/grep -q unregister_uprobe ") + s.kernel_build_tree + string ("/Module.symvers"); int rc = stap_system (grep_cmd.c_str()); + if (rc && s.verbose > 1) + clog << "Error " << rc << " " << strerror(rc) << endl; return (rc == 0); } @@ -283,6 +286,8 @@ copy_uprobes_symbols (systemtap_session& s) string cp_cmd = string("/bin/cp ") + uprobes_home + string("/Module.symvers ") + s.tmpdir; int rc = stap_system (cp_cmd.c_str()); + if (rc && s.verbose > 1) + clog << "Error " << rc << " " << strerror(rc) << endl; return rc; } @@ -348,6 +353,8 @@ run_pass (systemtap_session& s) if (s.verbose>1) clog << "Running " << staprun_cmd << endl; rc = stap_system (staprun_cmd.c_str ()); + if (rc && s.verbose > 1) + clog << "Error " << rc << " " << strerror(rc) << endl; return rc; } @@ -508,7 +515,10 @@ make_typequery_umod(systemtap_session& s, const string& header, string& name) + name + " -xc /dev/null -include " + header; if (s.verbose < 4) cmd += " >/dev/null 2>&1"; - return stap_system (cmd.c_str()); + int rc = stap_system (cmd.c_str()); + if (rc && s.verbose > 1) + clog << "Error " << rc << " " << strerror(rc) << endl; + return rc; } |