~bkerensa/ubuntu/raring/valgrind/merge-from-deb

« back to all changes in this revision

Viewing changes to coregrind/m_tooliface.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrés Roldán
  • Date: 2008-06-13 02:31:40 UTC
  • mto: (1.4.1 upstream) (2.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: james.westby@ubuntu.com-20080613023140-iwk33rz9rhvfkr96
Import upstream version 3.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
   This file is part of Valgrind, a dynamic binary instrumentation
9
9
   framework.
10
10
 
11
 
   Copyright (C) 2000-2006 Nicholas Nethercote
 
11
   Copyright (C) 2000-2007 Nicholas Nethercote
12
12
      njn@valgrind.org
13
13
 
14
14
   This program is free software; you can redistribute it and/or
40
40
 
41
41
void VG_(basic_tool_funcs)(
42
42
   void(*post_clo_init)(void),
43
 
   IRBB*(*instrument)(VgCallbackClosure*, IRBB*, 
 
43
   IRSB*(*instrument)(VgCallbackClosure*, IRSB*, 
44
44
                      VexGuestLayout*, VexGuestExtents*, IRType, IRType),
45
45
   void(*fini)(Int)
46
46
)
86
86
   .core_errors          = False,
87
87
   .tool_errors          = False,
88
88
   .libc_freeres         = False,
89
 
   .basic_block_discards = False,
 
89
   .superblock_discards  = False,
90
90
   .command_line_options = False,
91
91
   .client_requests      = False,
92
92
   .syscall_wrapper      = False,
94
94
   .data_syms            = False,
95
95
   .malloc_replacement   = False,
96
96
   .xml_output           = False,
 
97
   .final_IR_tidy_pass   = False
97
98
};
98
99
 
99
100
/* static */
164
165
NEEDS(data_syms)
165
166
NEEDS(xml_output)
166
167
 
167
 
void VG_(needs_basic_block_discards)(
 
168
void VG_(needs_superblock_discards)(
168
169
   void (*discard)(Addr64, VexGuestExtents)
169
170
)
170
171
{
171
 
   VG_(needs).basic_block_discards = True;
172
 
   VG_(tdict).tool_discard_basic_block_info = discard;
 
172
   VG_(needs).superblock_discards = True;
 
173
   VG_(tdict).tool_discard_superblock_info = discard;
173
174
}
174
175
 
175
176
void VG_(needs_tool_errors)(
176
177
   Bool (*eq)         (VgRes, Error*, Error*),
177
178
   void (*pp)         (Error*),
 
179
   Bool show_TIDs,
178
180
   UInt (*update)     (Error*),
179
181
   Bool (*recog)      (Char*, Supp*),
180
182
   Bool (*read_extra) (Int, Char*, Int, Supp*),
186
188
   VG_(needs).tool_errors = True;
187
189
   VG_(tdict).tool_eq_Error                     = eq;
188
190
   VG_(tdict).tool_pp_Error                     = pp;
 
191
   VG_(tdict).tool_show_ThreadIDs_for_errors    = show_TIDs;
189
192
   VG_(tdict).tool_update_extra                 = update;
190
193
   VG_(tdict).tool_recognised_suppression       = recog;
191
194
   VG_(tdict).tool_read_extra_suppression_info  = read_extra;
260
263
   VG_(tdict).tool_client_redzone_szB   = client_malloc_redzone_szB;
261
264
}
262
265
 
 
266
void VG_(needs_final_IR_tidy_pass)( 
 
267
   IRSB*(*final_tidy)(IRSB*)
 
268
)
 
269
{
 
270
   VG_(needs).final_IR_tidy_pass = True;
 
271
   VG_(tdict).tool_final_IR_tidy_pass = final_tidy;
 
272
}
263
273
 
264
274
/*--------------------------------------------------------------------*/
265
275
/* Tracked events */
321
331
 
322
332
DEF(track_post_reg_write_clientcall_return, ThreadId, OffT, SizeT, Addr)
323
333
 
324
 
DEF(track_thread_run,            ThreadId)
325
 
 
326
 
DEF(track_post_thread_create,    ThreadId, ThreadId)
327
 
DEF(track_post_thread_join,      ThreadId, ThreadId)
328
 
 
329
 
DEF(track_pre_mutex_lock,        ThreadId, void*)
330
 
DEF(track_post_mutex_lock,       ThreadId, void*)
331
 
DEF(track_post_mutex_unlock,     ThreadId, void*)
 
334
DEF(track_start_client_code,     ThreadId, ULong)
 
335
DEF(track_stop_client_code,      ThreadId, ULong)
 
336
 
 
337
DEF(track_pre_thread_ll_create,  ThreadId, ThreadId)
 
338
DEF(track_pre_thread_first_insn, ThreadId)
 
339
DEF(track_pre_thread_ll_exit,    ThreadId)
332
340
 
333
341
DEF(track_pre_deliver_signal,    ThreadId, Int sigNo, Bool)
334
342
DEF(track_post_deliver_signal,   ThreadId, Int sigNo)