for skins.
Changed lackey to print out the exit code.
Changed AUTOMAKE_OPTIONS back to 1.5 (whoops)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1538
-AUTOMAKE_OPTIONS = 1.4
+AUTOMAKE_OPTIONS = 1.5
## coregrind must come before memcheck, addrcheck, helgrind, for
## vg_replace_malloc.o.
{
}
-void SK_(fini) ( void )
+void SK_(fini) ( Int exitcode )
{
MAC_(common_fini)( ac_detect_memory_leaks );
}
for (i = 0; i < space; i++) buf[i] = ' ';
}
-void SK_(fini)(void)
+void SK_(fini)(Int exitcode)
{
CC D_total;
ULong L2_total_m, L2_total_mr, L2_total_mw,
return cb;
}
-void SK_(fini)(void)
+void SK_(fini)(Int exitcode)
{
}
}
__attribute__ ((weak))
-void SK_(fini)(void)
+void SK_(fini)(Int exitcode)
{
fund_panic("SK_(fini)");
}
if (VG_(needs).core_errors || VG_(needs).skin_errors)
VG_(show_all_errors)();
- SK_(fini)();
+ SK_(fini)( VG_(exitcode) );
VG_(do_sanity_checks)( True /*include expensive checks*/ );
return cb;
}
-void SK_(fini)(void)
+void SK_(fini)(exitcode)
{
}
}
-void SK_(fini)(void)
+void SK_(fini)(Int exitcode)
{
if (DEBUG_LOCK_TABLE) {
pp_all_LockSets();
'orig_addr' is the address of the first instruction in the block. */
extern UCodeBlock* SK_(instrument) ( UCodeBlock* cb, Addr orig_addr );
-/* Finish up, print out any results, etc. */
-extern void SK_(fini) ( void );
+/* Finish up, print out any results, etc. `exitcode' is program's exit
+ code. The shadow (if the `shadow_regs' need is set) can be found with
+ VG_(get_shadow_archreg)(R_EBX), since %ebx holds the argument to the
+ exit() syscall. */
+extern void SK_(fini) ( Int exitcode );
/* ------------------------------------------------------------------ */
return cb;
}
-void SK_(fini)(void)
+void SK_(fini)(Int exitcode)
{
VG_(message)(Vg_UserMsg,
"Counted %d calls to _dl_runtime_resolve()", n_dlrr_calls);
VG_(message)(Vg_UserMsg, " UInstrs : x86_instr = %3u : 10",
10 * n_UInstrs / n_x86_instrs);
+ VG_(message)(Vg_UserMsg, "");
+ VG_(message)(Vg_UserMsg, "Exit code: %d", exitcode);
}
/*--------------------------------------------------------------------*/
# UInstrs : BB = 111 : 10
# UInstrs : x86_instr = 27 : 10
#
+# Exit code: 0
+#
# ...so chop all lines between first and last (inclusive)
sed "/^Counted [0-9]\+ calls to _dl_runtime_resolve()$/ , \
/UInstrs : x86_instrs = [0-9]\+ : [0-9]\+/ \
{
}
-void SK_(fini) ( void )
+void SK_(fini) ( Int exitcode )
{
MAC_(common_fini)( MC_(detect_memory_leaks) );
return cb;
}
-void SK_(fini)(void)
+void SK_(fini)(Int exitcode)
{
}