a couple of places, and is no longer needed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3096
VG_(init_pre_mem_read) ( & ac_check_is_readable );
VG_(init_pre_mem_read_asciiz) ( & ac_check_is_readable_asciiz );
VG_(init_pre_mem_write) ( & ac_check_is_writable );
- VG_(init_post_mem_write) ( & ac_make_accessible );
+ VG_(init_post_mem_write) ( & ac_post_mem_write );
VGP_(register_profile_event) ( VgpSetMem, "set-mem-perms" );
VGP_(register_profile_event) ( VgpCheckMem, "check-mem-perms" );
Bool core_errors;
Bool tool_errors;
Bool basic_block_discards;
- Bool shadow_regs;
+ Bool no_longer_used_1; // for backwards compatibility
Bool command_line_options;
Bool client_requests;
Bool no_longer_used_0; // for backwards compatibility
IRBB*, instrument, IRBB* bb, VexGuestLayout* layout, IRType hWordTy
## 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_exit_status_shadow)().
+## code. The shadow can be found with VG_(get_exit_status_shadow)().
void, fini, Int exitcode
void, discard_basic_block_info, Addr a, SizeT size
-## ------------------------------------------------------------------
-## VG_(needs).shadow_regs
-
-## No functions must be defined, but the post_reg[s]_write_* events should
-## be tracked.
-
## ------------------------------------------------------------------
## VG_(needs).command_line_options
void, post_mem_write, CorePart part, ThreadId tid, Addr a, SizeT size
-## Register events -- if `shadow_regs' need is set, these should probably be
-## used. Use VG_(set_shadow_state_area)() to set the shadow regs for these
-## events.
+## Register events. Use VG_(set_shadow_state_area)() to set the shadow regs
+## for these events.
void, pre_reg_read, CorePart part, ThreadId tid, Char* s, OffT guest_state_offset, SizeT size
void, post_reg_write, CorePart part, ThreadId tid, OffT guest_state_offset, SizeT size
.tool_errors = False,
.libc_freeres = False,
.basic_block_discards = False,
- .shadow_regs = False,
+ .no_longer_used_1 = False,
.command_line_options = False,
.client_requests = False,
.no_longer_used_0 = False,
VG_(tool_panic)("`die_mem_stack' should be defined\n");
}
- if ( (VG_(defined_post_reg_write)() ||
- VG_(defined_post_reg_write_clientcall_return)()) &&
- ! VG_(needs).shadow_regs)
- {
- VG_(printf)("\nTool error: one of the `post_reg_write'\n"
- "events tracked, but `shadow_regs' need not set.\n");
- VG_(tool_panic)("`shadow_regs' should be set\n");
- }
-
if (VG_(needs).shadow_memory != (VG_(get_shadow_size)() != 0)) {
if (VG_(get_shadow_size)() != 0)
VG_(printf)("\nTool error: tool allocated shadow memory, but apparently doesn't "
NEEDS(core_errors)
NEEDS(tool_errors)
NEEDS(basic_block_discards)
-NEEDS(shadow_regs)
NEEDS(command_line_options)
NEEDS(client_requests)
NEEDS(syscall_wrapper)
frame->magicPI = 0x31415927;
- frame->vex = tst->arch.vex;
- if (VG_(needs).shadow_regs)
- frame->vex_shadow = tst->arch.vex_shadow;
+ frame->vex = tst->arch.vex;
+ frame->vex_shadow = tst->arch.vex_shadow;
frame->mask = tst->sig_mask;
VG_TRACK( die_mem_stack_signal, (Addr)frame, sizeof(VgSigFrame) );
/* restore machine state */
- tst->arch.vex = frame->vex;
- if (VG_(needs).shadow_regs)
- tst->arch.vex_shadow = frame->vex_shadow;
+ tst->arch.vex = frame->vex;
+ tst->arch.vex_shadow = frame->vex_shadow;
/* And restore the thread's status to what it was before the signal
was delivered. */
to the start of the .vex field. */
VGOFF_(m_eip) = offsetof(VexGuestX86State,guest_EIP)/4;
- if (VG_(needs).shadow_regs) {
- VG_TRACK( post_reg_write, Vg_CoreStartup, /*tid*/1, /*offset*/0,
- sizeof(VexGuestArchState));
- }
+ VG_TRACK( post_reg_write, Vg_CoreStartup, /*tid*/1, /*offset*/0,
+ sizeof(VexGuestArchState));
/* I assume that if we have SSE2 we also have SSE */
VG_(have_ssestate) = False;
UInt *eax_ret, UInt *ebx_ret,
UInt *ecx_ret, UInt *edx_ret );
-
-/* ------------------------------------------------------------------ */
-/* Accessing archregs and their shadows */
-
-// For get/set, 'area' is where the asked-for shadow state will be copied
-// into/from.
-
-extern void VG_(get_shadow_regs_area) ( ThreadId tid, OffT guest_state_offset,
- SizeT size, UChar* area );
-extern void VG_(set_shadow_regs_area) ( ThreadId tid, OffT guest_state_offset,
- SizeT size, const UChar* area );
-
/*====================================================================*/
/*=== Execution contexts ===*/
/*====================================================================*/
extern void *VG_(SkipNode_First) (const SkipList *l);
extern void *VG_(SkipNode_Next) (const SkipList *l, void *data);
+
/*====================================================================*/
/*=== Functions for shadow registers ===*/
/*====================================================================*/
-/* Nb: make sure the shadow_regs 'need' is set before using these! */
+// For get/set, 'area' is where the asked-for shadow state will be copied
+// into/from.
+extern void VG_(get_shadow_regs_area) ( ThreadId tid, OffT guest_state_offset,
+ SizeT size, UChar* area );
+extern void VG_(set_shadow_regs_area) ( ThreadId tid, OffT guest_state_offset,
+ SizeT size, const UChar* area );
/* This one lets you override the shadow of the return value register for a
syscall. Call it from TL_(post_syscall)() (not TL_(pre_syscall)()!) to
to be used for more than one instruction in one program run... */
extern void VG_(needs_basic_block_discards) ( void );
-/* Tool maintains information about each register? */
-extern void VG_(needs_shadow_regs) ( void );
-
/* Tool defines its own command line options? */
extern void VG_(needs_command_line_options) ( void );
VG_(needs_core_errors) ();
VG_(needs_tool_errors) ();
VG_(needs_libc_freeres) ();
- VG_(needs_shadow_regs) ();
VG_(needs_command_line_options)();
VG_(needs_client_requests) ();
VG_(needs_sanity_checks) ();