else VG_BOOL_CLO(arg, "--error-limit", VG_(clo_error_limit))
else VG_NUM_CLO (arg, "--error-exitcode", VG_(clo_error_exitcode))
else VG_BOOL_CLO(arg, "--show-emwarns", VG_(clo_show_emwarns))
- else VG_NUM_CLO (arg, "--max-stackframe", VG_(clo_max_stackframe))
+ else VG_NUMW_CLO(arg, "--max-stackframe", VG_(clo_max_stackframe))
else VG_BOOL_CLO(arg, "--run-libc-freeres", VG_(clo_run_libc_freeres))
else VG_BOOL_CLO(arg, "--show-below-main", VG_(clo_show_below_main))
else VG_BOOL_CLO(arg, "--time-stamp", VG_(clo_time_stamp))
Bool VG_(clo_track_fds) = False;
Bool VG_(clo_show_below_main)= False;
Bool VG_(clo_show_emwarns) = False;
-Int VG_(clo_max_stackframe) = 2000000;
+Word VG_(clo_max_stackframe) = 2000000;
Bool VG_(clo_wait_for_gdb) = False;
VgSmc VG_(clo_smc_check) = Vg_SmcStack;
HChar* VG_(clo_kernel_variant) = NULL;
"Warning: client switching stacks? "
"SP change: %p --> %p", old_SP, new_SP);
VG_(message)(Vg_UserMsg,
- " to suppress, use: --max-stackframe=%d or greater",
+ " to suppress, use: --max-stackframe=%ld or greater",
(delta < 0 ? -delta : delta));
if (moans == 0)
VG_(message)(Vg_UserMsg,
extern Bool VG_(clo_show_emwarns);
/* How much does the stack pointer have to change before tools
- consider a stack switch to have happened? Default: 2000000 bytes */
-extern Int VG_(clo_max_stackframe);
+ consider a stack switch to have happened? Default: 2000000 bytes
+ NB: must be host-word-sized to be correct (hence Word). */
+extern Word VG_(clo_max_stackframe);
/* Delay startup to allow GDB to be attached? Default: NO */
extern Bool VG_(clo_wait_for_gdb);
(qq_var) = (Int)VG_(atoll)( &qq_arg[ VG_(strlen)(qq_option)+1 ] ); \
}
+/* Same as VG_NUM_CLO but does not coerce the result value to 32 bits
+ on 64-bit platforms. */
+#define VG_NUMW_CLO(qq_arg, qq_option, qq_var) \
+ if (VG_CLO_STREQN(VG_(strlen)(qq_option)+1, qq_arg, qq_option"=")) { \
+ (qq_var) = (Word)VG_(atoll)( &qq_arg[ VG_(strlen)(qq_option)+1 ] ); \
+ }
+
/* Bounded integer arg */
#define VG_BNUM_CLO(qq_arg, qq_option, qq_var, qq_lo, qq_hi) \
if (VG_CLO_STREQN(VG_(strlen)(qq_option)+1, qq_arg, qq_option"=")) { \