blob: c31f71549dfe4907d291914869eaf7bba7028bd9 [file] [log] [blame]
njnc9539842002-10-02 13:26:35 +00001
njn25e49d8e72002-09-23 09:36:25 +00002/*--------------------------------------------------------------------*/
nethercote137bc552003-11-14 17:47:54 +00003/*--- A header file for all parts of the MemCheck tool. ---*/
njn25cac76cb2002-09-23 11:21:57 +00004/*--- mc_include.h ---*/
njn25e49d8e72002-09-23 09:36:25 +00005/*--------------------------------------------------------------------*/
6
7/*
nethercote137bc552003-11-14 17:47:54 +00008 This file is part of MemCheck, a heavyweight Valgrind tool for
njnc9539842002-10-02 13:26:35 +00009 detecting memory errors.
njn25e49d8e72002-09-23 09:36:25 +000010
sewardj4d474d02008-02-11 11:34:59 +000011 Copyright (C) 2000-2008 Julian Seward
njn25e49d8e72002-09-23 09:36:25 +000012 jseward@acm.org
13
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation; either version 2 of the
17 License, or (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 02111-1307, USA.
28
29 The GNU General Public License is contained in the file COPYING.
30*/
31
njn25cac76cb2002-09-23 11:21:57 +000032#ifndef __MC_INCLUDE_H
33#define __MC_INCLUDE_H
njn25e49d8e72002-09-23 09:36:25 +000034
njn44acd3e2005-05-13 21:39:45 +000035#define MC_(str) VGAPPEND(vgMemCheck_,str)
njn25e49d8e72002-09-23 09:36:25 +000036
sewardj7ce71662008-05-02 10:33:15 +000037
38/* This is a private header file for use only within the
39 memcheck/ directory. */
40
njn25e49d8e72002-09-23 09:36:25 +000041/*------------------------------------------------------------*/
njn1d0825f2006-03-27 11:37:07 +000042/*--- Tracking the heap ---*/
njn43c799e2003-04-08 00:08:52 +000043/*------------------------------------------------------------*/
44
njn1d0825f2006-03-27 11:37:07 +000045/* We want at least a 16B redzone on client heap blocks for Memcheck */
46#define MC_MALLOC_REDZONE_SZB 16
47
48/* For malloc()/new/new[] vs. free()/delete/delete[] mismatch checking. */
49typedef
50 enum {
51 MC_AllocMalloc = 0,
52 MC_AllocNew = 1,
53 MC_AllocNewVec = 2,
54 MC_AllocCustom = 3
55 }
56 MC_AllocKind;
57
58/* Nb: first two fields must match core's VgHashNode. */
59typedef
60 struct _MC_Chunk {
61 struct _MC_Chunk* next;
62 Addr data; // ptr to actual block
njn718d3b12006-12-16 00:54:12 +000063 SizeT szB : (sizeof(UWord)*8)-2; // size requested; 30 or 62 bits
njn1d0825f2006-03-27 11:37:07 +000064 MC_AllocKind allockind : 2; // which wrapper did the allocation
65 ExeContext* where; // where it was allocated
66 }
67 MC_Chunk;
68
69/* Memory pool. Nb: first two fields must match core's VgHashNode. */
70typedef
71 struct _MC_Mempool {
72 struct _MC_Mempool* next;
73 Addr pool; // pool identifier
74 SizeT rzB; // pool red-zone size
75 Bool is_zeroed; // allocations from this pool are zeroed
76 VgHashTable chunks; // chunks associated with this pool
77 }
78 MC_Mempool;
79
80
sewardj56adc352008-05-02 11:25:17 +000081void* MC_(new_block) ( ThreadId tid,
82 Addr p, SizeT size, SizeT align, UInt rzB,
83 Bool is_zeroed, MC_AllocKind kind,
84 VgHashTable table);
85void MC_(handle_free) ( ThreadId tid,
86 Addr p, UInt rzB, MC_AllocKind kind );
njn1d0825f2006-03-27 11:37:07 +000087
sewardj56adc352008-05-02 11:25:17 +000088void MC_(create_mempool) ( Addr pool, UInt rzB, Bool is_zeroed );
89void MC_(destroy_mempool) ( Addr pool );
90void MC_(mempool_alloc) ( ThreadId tid, Addr pool,
91 Addr addr, SizeT size );
92void MC_(mempool_free) ( Addr pool, Addr addr );
93void MC_(mempool_trim) ( Addr pool, Addr addr, SizeT size );
94void MC_(move_mempool) ( Addr poolA, Addr poolB );
95void MC_(mempool_change) ( Addr pool, Addr addrA, Addr addrB, SizeT size );
96Bool MC_(mempool_exists) ( Addr pool );
njn1d0825f2006-03-27 11:37:07 +000097
sewardj56adc352008-05-02 11:25:17 +000098MC_Chunk* MC_(get_freed_list_head)( void );
njn1d0825f2006-03-27 11:37:07 +000099
100/* For tracking malloc'd blocks */
sewardj56adc352008-05-02 11:25:17 +0000101VgHashTable MC_(malloc_list);
njn1d0825f2006-03-27 11:37:07 +0000102
103/* For tracking memory pools. */
sewardj56adc352008-05-02 11:25:17 +0000104VgHashTable MC_(mempool_list);
njn1d0825f2006-03-27 11:37:07 +0000105
106/* Shadow memory functions */
sewardj56adc352008-05-02 11:25:17 +0000107Bool MC_(check_mem_is_noaccess)( Addr a, SizeT len, Addr* bad_addr );
108void MC_(make_mem_noaccess) ( Addr a, SizeT len );
109void MC_(make_mem_undefined_w_otag)( Addr a, SizeT len, UInt otag );
110void MC_(make_mem_defined) ( Addr a, SizeT len );
111void MC_(copy_address_range_state) ( Addr src, Addr dst, SizeT len );
njn1d0825f2006-03-27 11:37:07 +0000112
sewardj56adc352008-05-02 11:25:17 +0000113void MC_(print_malloc_stats) ( void );
njn1d0825f2006-03-27 11:37:07 +0000114
sewardj56adc352008-05-02 11:25:17 +0000115void* MC_(malloc) ( ThreadId tid, SizeT n );
116void* MC_(__builtin_new) ( ThreadId tid, SizeT n );
117void* MC_(__builtin_vec_new) ( ThreadId tid, SizeT n );
118void* MC_(memalign) ( ThreadId tid, SizeT align, SizeT n );
119void* MC_(calloc) ( ThreadId tid, SizeT nmemb, SizeT size1 );
120void MC_(free) ( ThreadId tid, void* p );
121void MC_(__builtin_delete) ( ThreadId tid, void* p );
122void MC_(__builtin_vec_delete) ( ThreadId tid, void* p );
123void* MC_(realloc) ( ThreadId tid, void* p, SizeT new_size );
124
njn43c799e2003-04-08 00:08:52 +0000125
sewardj7cf4e6b2008-05-01 20:24:26 +0000126/*------------------------------------------------------------*/
127/*--- Origin tracking translate-time support ---*/
128/*------------------------------------------------------------*/
129
130/* See detailed comments in mc_machine.c. */
sewardj7cf4e6b2008-05-01 20:24:26 +0000131Int MC_(get_otrack_shadow_offset) ( Int offset, Int szB );
sewardj7cf4e6b2008-05-01 20:24:26 +0000132IRType MC_(get_otrack_reg_array_equiv_int_type) ( IRRegArray* arr );
133
134/* Constants which are used as the lowest 2 bits in origin tags.
135
136 An origin tag comprises an upper 30-bit ECU field and a lower 2-bit
137 'kind' field. The ECU field is a number given out by m_execontext
138 and has a 1-1 mapping with ExeContext*s. An ECU can be used
139 directly as an origin tag (otag), but in fact we want to put
140 additional information 'kind' field to indicate roughly where the
141 tag came from. This helps print more understandable error messages
142 for the user -- it has no other purpose.
143
144 Hence the following 2-bit constants are needed for 'kind' field.
145
146 To summarise:
147
148 * Both ECUs and origin tags are represented as 32-bit words
149
150 * m_execontext and the core-tool interface deal purely in ECUs.
151 They have no knowledge of origin tags - that is a purely
152 Memcheck-internal matter.
153
154 * all valid ECUs have the lowest 2 bits zero and at least
155 one of the upper 30 bits nonzero (see VG_(is_plausible_ECU))
156
157 * to convert from an ECU to an otag, OR in one of the MC_OKIND_
158 constants below
159
160 * to convert an otag back to an ECU, AND it with ~3
161*/
162
163#define MC_OKIND_UNKNOWN 0 /* unknown origin */
164#define MC_OKIND_HEAP 1 /* this is a heap origin */
165#define MC_OKIND_STACK 2 /* this is a stack origin */
166#define MC_OKIND_USER 3 /* arises from user-supplied client req */
167
njn43c799e2003-04-08 00:08:52 +0000168
169/*------------------------------------------------------------*/
njn1d0825f2006-03-27 11:37:07 +0000170/*--- Profiling of memory events ---*/
171/*------------------------------------------------------------*/
172
173/* Define to collect detailed performance info. */
174/* #define MC_PROFILE_MEMORY */
175
176#ifdef MC_PROFILE_MEMORY
177# define N_PROF_EVENTS 500
178
sewardj56adc352008-05-02 11:25:17 +0000179UInt MC_(event_ctr)[N_PROF_EVENTS];
180HChar* MC_(event_ctr_name)[N_PROF_EVENTS];
njn1d0825f2006-03-27 11:37:07 +0000181
182# define PROF_EVENT(ev, name) \
183 do { tl_assert((ev) >= 0 && (ev) < N_PROF_EVENTS); \
184 /* crude and inaccurate check to ensure the same */ \
185 /* event isn't being used with > 1 name */ \
186 if (MC_(event_ctr_name)[ev]) \
187 tl_assert(name == MC_(event_ctr_name)[ev]); \
188 MC_(event_ctr)[ev]++; \
189 MC_(event_ctr_name)[ev] = (name); \
190 } while (False);
191
192#else
193
194# define PROF_EVENT(ev, name) /* */
195
196#endif /* MC_PROFILE_MEMORY */
197
198
199/*------------------------------------------------------------*/
200/*--- V and A bits (Victoria & Albert ?) ---*/
201/*------------------------------------------------------------*/
202
203/* The number of entries in the primary map can be altered. However
204 we hardwire the assumption that each secondary map covers precisely
205 64k of address space. */
206#define SM_SIZE 65536 /* DO NOT CHANGE */
207#define SM_MASK (SM_SIZE-1) /* DO NOT CHANGE */
208
209#define V_BIT_DEFINED 0
210#define V_BIT_UNDEFINED 1
211
212#define V_BITS8_DEFINED 0
213#define V_BITS8_UNDEFINED 0xFF
214
215#define V_BITS16_DEFINED 0
216#define V_BITS16_UNDEFINED 0xFFFF
217
218#define V_BITS32_DEFINED 0
219#define V_BITS32_UNDEFINED 0xFFFFFFFF
220
221#define V_BITS64_DEFINED 0ULL
222#define V_BITS64_UNDEFINED 0xFFFFFFFFFFFFFFFFULL
223
224
225/*------------------------------------------------------------*/
226/*--- Leak checking ---*/
227/*------------------------------------------------------------*/
228
njn718d3b12006-12-16 00:54:12 +0000229/* A block is either
230 -- Proper-ly reached; a pointer to its start has been found
231 -- Interior-ly reached; only an interior pointer to it has been found
232 -- Unreached; so far, no pointers to any part of it have been found.
233 -- IndirectLeak; leaked, but referred to by another leaked block
234*/
235typedef
236 enum {
237 Unreached =0,
238 IndirectLeak =1,
239 Interior =2,
240 Proper =3
241 }
242 Reachedness;
243
njn1d0825f2006-03-27 11:37:07 +0000244/* For VALGRIND_COUNT_LEAKS client request */
sewardj56adc352008-05-02 11:25:17 +0000245SizeT MC_(bytes_leaked);
246SizeT MC_(bytes_indirect);
247SizeT MC_(bytes_dubious);
248SizeT MC_(bytes_reachable);
249SizeT MC_(bytes_suppressed);
njn1d0825f2006-03-27 11:37:07 +0000250
njn1d0825f2006-03-27 11:37:07 +0000251typedef
252 enum {
253 LC_Off,
254 LC_Summary,
255 LC_Full,
256 }
257 LeakCheckMode;
258
njn718d3b12006-12-16 00:54:12 +0000259/* A block record, used for generating err msgs. */
260typedef
261 struct _LossRecord {
262 struct _LossRecord* next;
263 /* Where these lost blocks were allocated. */
264 ExeContext* allocated_at;
265 /* Their reachability. */
266 Reachedness loss_mode;
267 /* Number of blocks and total # bytes involved. */
268 SizeT total_bytes;
269 SizeT indirect_bytes;
270 UInt num_blocks;
271 }
272 LossRecord;
273
sewardj56adc352008-05-02 11:25:17 +0000274void MC_(do_detect_memory_leaks) (
275 ThreadId tid, LeakCheckMode mode,
276 Bool (*is_within_valid_secondary) ( Addr ),
277 Bool (*is_valid_aligned_word) ( Addr )
278 );
njn1d0825f2006-03-27 11:37:07 +0000279
sewardj56adc352008-05-02 11:25:17 +0000280void MC_(pp_LeakError)(UInt n_this_record, UInt n_total_records,
281 LossRecord* l);
njn718d3b12006-12-16 00:54:12 +0000282
283
284/*------------------------------------------------------------*/
285/*--- Errors and suppressions ---*/
286/*------------------------------------------------------------*/
287
sewardj7ce71662008-05-02 10:33:15 +0000288/* Did we show to the user, any errors for which an uninitialised
289 value origin could have been collected (but wasn't) ? If yes,
290 then, at the end of the run, print a 1 line message advising that a
291 rerun with --track-origins=yes might help. */
292Bool MC_(any_value_errors);
293
294/* Standard functions for error and suppressions as required by the
295 core/tool iface */
296Bool MC_(eq_Error) ( VgRes res, Error* e1, Error* e2 );
297void MC_(pp_Error) ( Error* err );
298UInt MC_(update_Error_extra)( Error* err );
299
300Bool MC_(is_recognised_suppression) ( Char* name, Supp* su );
301
302Bool MC_(read_extra_suppression_info) ( Int fd, Char* buf,
303 Int nBuf, Supp *su );
304
305Bool MC_(error_matches_suppression) ( Error* err, Supp* su );
306
307void MC_(print_extra_suppression_info) ( Error* err );
308
309Char* MC_(get_error_name) ( Error* err );
310
311/* Recording of errors */
312void MC_(record_address_error) ( ThreadId tid, Addr a, Int szB,
313 Bool isWrite );
314void MC_(record_cond_error) ( ThreadId tid, UInt otag );
315void MC_(record_value_error) ( ThreadId tid, Int szB, UInt otag );
316void MC_(record_jump_error) ( ThreadId tid, Addr a );
317
318void MC_(record_free_error) ( ThreadId tid, Addr a );
319void MC_(record_illegal_mempool_error) ( ThreadId tid, Addr a );
320void MC_(record_freemismatch_error) ( ThreadId tid, MC_Chunk* mc );
321
322void MC_(record_overlap_error) ( ThreadId tid, Char* function,
323 Addr src, Addr dst, SizeT szB );
324void MC_(record_core_mem_error) ( ThreadId tid, Bool isAddrErr, Char* msg );
325void MC_(record_regparam_error) ( ThreadId tid, Char* msg, UInt otag );
326void MC_(record_memparam_error) ( ThreadId tid, Addr a,
327 Bool isAddrErr, Char* msg, UInt otag );
328void MC_(record_user_error) ( ThreadId tid, Addr a,
329 Bool isAddrErr, UInt otag );
330
331Bool MC_(record_leak_error) ( ThreadId tid,
332 UInt n_this_record,
333 UInt n_total_records,
334 LossRecord* lossRecord,
335 Bool print_record );
336
337/* Is this address in a user-specified "ignored range" ? */
338Bool MC_(in_ignored_range) ( Addr a );
339
340
341/*------------------------------------------------------------*/
342/*--- Client blocks ---*/
343/*------------------------------------------------------------*/
344
345/* Describes a client block. See mc_main.c. An unused block has
346 start == size == 0. */
347typedef
348 struct {
349 Addr start;
350 SizeT size;
351 ExeContext* where;
352 Char* desc;
353 }
354 CGenBlock;
355
356/* Get access to the client block array. */
357void MC_(get_ClientBlock_array)( /*OUT*/CGenBlock** blocks,
358 /*OUT*/UWord* nBlocks );
359
njn718d3b12006-12-16 00:54:12 +0000360
njn1d0825f2006-03-27 11:37:07 +0000361/*------------------------------------------------------------*/
362/*--- Command line options + defaults ---*/
363/*------------------------------------------------------------*/
364
365/* Allow loads from partially-valid addresses? default: YES */
sewardj56adc352008-05-02 11:25:17 +0000366Bool MC_(clo_partial_loads_ok);
njn1d0825f2006-03-27 11:37:07 +0000367
368/* Max volume of the freed blocks queue. */
sewardj56adc352008-05-02 11:25:17 +0000369Long MC_(clo_freelist_vol);
njn1d0825f2006-03-27 11:37:07 +0000370
371/* Do leak check at exit? default: NO */
sewardj56adc352008-05-02 11:25:17 +0000372LeakCheckMode MC_(clo_leak_check);
njn1d0825f2006-03-27 11:37:07 +0000373
374/* How closely should we compare ExeContexts in leak records? default: 2 */
sewardj56adc352008-05-02 11:25:17 +0000375VgRes MC_(clo_leak_resolution);
njn1d0825f2006-03-27 11:37:07 +0000376
377/* In leak check, show reachable-but-not-freed blocks? default: NO */
sewardj56adc352008-05-02 11:25:17 +0000378Bool MC_(clo_show_reachable);
njn1d0825f2006-03-27 11:37:07 +0000379
380/* Assume accesses immediately below %esp are due to gcc-2.96 bugs.
381 * default: NO */
sewardj56adc352008-05-02 11:25:17 +0000382Bool MC_(clo_workaround_gcc296_bugs);
njn1d0825f2006-03-27 11:37:07 +0000383
sewardjeb0fa932007-11-30 21:41:40 +0000384/* Fill malloc-d/free-d client blocks with a specific value? -1 if
385 not, else 0x00 .. 0xFF indicating the fill value to use. Can be
386 useful for causing programs with bad heap corruption to fail in
387 more repeatable ways. Note that malloc-filled and free-filled
388 areas are still undefined and noaccess respectively. This merely
389 causes them to contain the specified values. */
sewardj56adc352008-05-02 11:25:17 +0000390Int MC_(clo_malloc_fill);
391Int MC_(clo_free_fill);
sewardjeb0fa932007-11-30 21:41:40 +0000392
sewardj7cf4e6b2008-05-01 20:24:26 +0000393/* Indicates the level of instrumentation/checking done by Memcheck.
394
395 1 = No undefined value checking, Addrcheck-style behaviour only:
396 only address checking is done. This is faster but finds fewer
397 errors. Note that although Addrcheck had 1 bit per byte
398 overhead vs the old Memcheck's 9 bits per byte, with this mode
399 and compressed V bits, no memory is saved with this mode --
400 it's still 2 bits per byte overhead. This is a little wasteful
401 -- it could be done with 1 bit per byte -- but lets us reuse
402 the many shadow memory access functions. Note that in this
403 mode neither the secondary V bit table nor the origin-tag cache
404 are used.
405
406 2 = Address checking and Undefined value checking are performed,
407 but origins are not tracked. So the origin-tag cache is not
408 used in this mode. This setting is the default and corresponds
409 to the "normal" Memcheck behaviour that has shipped for years.
410
411 3 = Address checking, undefined value checking, and origins for
412 undefined values are tracked.
413
414 The default is 2.
415*/
sewardj56adc352008-05-02 11:25:17 +0000416Int MC_(clo_mc_level);
sewardj7cf4e6b2008-05-01 20:24:26 +0000417
njn1d0825f2006-03-27 11:37:07 +0000418
419/*------------------------------------------------------------*/
420/*--- Instrumentation ---*/
njn25e49d8e72002-09-23 09:36:25 +0000421/*------------------------------------------------------------*/
422
njn66fe05a2003-07-22 09:12:33 +0000423/* Functions defined in mc_main.c */
sewardj95448072004-11-22 20:19:51 +0000424
sewardj7cf4e6b2008-05-01 20:24:26 +0000425/* For the fail_w_o functions, the UWord arg is actually the 32-bit
426 origin tag and should really be UInt, but to be simple and safe
427 considering it's called from generated code, just claim it to be a
428 UWord. */
sewardj56adc352008-05-02 11:25:17 +0000429VG_REGPARM(2) void MC_(helperc_value_checkN_fail_w_o) ( HWord, UWord );
430VG_REGPARM(1) void MC_(helperc_value_check8_fail_w_o) ( UWord );
431VG_REGPARM(1) void MC_(helperc_value_check4_fail_w_o) ( UWord );
432VG_REGPARM(1) void MC_(helperc_value_check1_fail_w_o) ( UWord );
433VG_REGPARM(1) void MC_(helperc_value_check0_fail_w_o) ( UWord );
sewardj7cf4e6b2008-05-01 20:24:26 +0000434
435/* And call these ones instead to report an uninitialised value error
436 but with no origin available. */
sewardj56adc352008-05-02 11:25:17 +0000437VG_REGPARM(1) void MC_(helperc_value_checkN_fail_no_o) ( HWord );
438VG_REGPARM(0) void MC_(helperc_value_check8_fail_no_o) ( void );
439VG_REGPARM(0) void MC_(helperc_value_check4_fail_no_o) ( void );
440VG_REGPARM(0) void MC_(helperc_value_check1_fail_no_o) ( void );
441VG_REGPARM(0) void MC_(helperc_value_check0_fail_no_o) ( void );
sewardj7cf4e6b2008-05-01 20:24:26 +0000442
443/* V-bits load/store helpers */
sewardj56adc352008-05-02 11:25:17 +0000444VG_REGPARM(1) void MC_(helperc_STOREV64be) ( Addr, ULong );
445VG_REGPARM(1) void MC_(helperc_STOREV64le) ( Addr, ULong );
446VG_REGPARM(2) void MC_(helperc_STOREV32be) ( Addr, UWord );
447VG_REGPARM(2) void MC_(helperc_STOREV32le) ( Addr, UWord );
448VG_REGPARM(2) void MC_(helperc_STOREV16be) ( Addr, UWord );
449VG_REGPARM(2) void MC_(helperc_STOREV16le) ( Addr, UWord );
450VG_REGPARM(2) void MC_(helperc_STOREV8) ( Addr, UWord );
sewardj95448072004-11-22 20:19:51 +0000451
sewardj56adc352008-05-02 11:25:17 +0000452VG_REGPARM(1) ULong MC_(helperc_LOADV64be) ( Addr );
453VG_REGPARM(1) ULong MC_(helperc_LOADV64le) ( Addr );
454VG_REGPARM(1) UWord MC_(helperc_LOADV32be) ( Addr );
455VG_REGPARM(1) UWord MC_(helperc_LOADV32le) ( Addr );
456VG_REGPARM(1) UWord MC_(helperc_LOADV16be) ( Addr );
457VG_REGPARM(1) UWord MC_(helperc_LOADV16le) ( Addr );
458VG_REGPARM(1) UWord MC_(helperc_LOADV8) ( Addr );
njn25e49d8e72002-09-23 09:36:25 +0000459
sewardj56adc352008-05-02 11:25:17 +0000460void MC_(helperc_MAKE_STACK_UNINIT) ( Addr base, UWord len,
461 Addr nia );
sewardj7cf4e6b2008-05-01 20:24:26 +0000462
463/* Origin tag load/store helpers */
464VG_REGPARM(2) void MC_(helperc_b_store1) ( Addr a, UWord d32 );
465VG_REGPARM(2) void MC_(helperc_b_store2) ( Addr a, UWord d32 );
466VG_REGPARM(2) void MC_(helperc_b_store4) ( Addr a, UWord d32 );
467VG_REGPARM(2) void MC_(helperc_b_store8) ( Addr a, UWord d32 );
468VG_REGPARM(2) void MC_(helperc_b_store16)( Addr a, UWord d32 );
469VG_REGPARM(1) UWord MC_(helperc_b_load1) ( Addr a );
470VG_REGPARM(1) UWord MC_(helperc_b_load2) ( Addr a );
471VG_REGPARM(1) UWord MC_(helperc_b_load4) ( Addr a );
472VG_REGPARM(1) UWord MC_(helperc_b_load8) ( Addr a );
473VG_REGPARM(1) UWord MC_(helperc_b_load16)( Addr a );
sewardj826ec492005-05-12 18:05:00 +0000474
njn51d827b2005-05-09 01:02:08 +0000475/* Functions defined in mc_translate.c */
sewardj0b9d74a2006-12-24 02:24:11 +0000476IRSB* MC_(instrument) ( VgCallbackClosure* closure,
477 IRSB* bb_in,
sewardj461df9c2006-01-17 02:06:39 +0000478 VexGuestLayout* layout,
479 VexGuestExtents* vge,
sewardj4ba057c2005-10-18 12:04:18 +0000480 IRType gWordTy, IRType hWordTy );
sewardj8d61eb12005-07-08 09:46:53 +0000481
sewardj81651dc2007-08-28 06:05:20 +0000482IRSB* MC_(final_tidy) ( IRSB* );
483
sewardj8d61eb12005-07-08 09:46:53 +0000484#endif /* ndef __MC_INCLUDE_H */
njn25e49d8e72002-09-23 09:36:25 +0000485
486/*--------------------------------------------------------------------*/
nethercote8b76fe52004-11-08 19:20:09 +0000487/*--- end ---*/
njn25e49d8e72002-09-23 09:36:25 +0000488/*--------------------------------------------------------------------*/