2
This file is part of drd, a data race detector.
4
Copyright (C) 2006-2007 Bart Van Assche
5
bart.vanassche@gmail.com
7
This program is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the
10
License, or (at your option) any later version.
12
This program is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22
The GNU General Public License is contained in the file COPYING.
30
#include "pub_drd_bitmap.h" // BmAccessTypeT
31
#include "drd_thread.h" // DrdThreadId
32
#include "pub_tool_basics.h" // SizeT
33
#include "pub_tool_debuginfo.h" // SegInfo
34
#include "pub_tool_errormgr.h" // ExeContext
37
/* DRD error types. */
46
/* The classification of a faulting address. */
49
//Undescribed, // as-yet unclassified
51
eUnknown, // classification yielded nothing useful
54
eSegment, // in a segment (as defined in pub_tool_debuginfo.h)
55
//UserG, // in a user-defined block
56
//Mempool, // in a mempool
57
//Register, // in a register; for Param errors only
61
/* Records info about a faulting address. */
64
AddrKind akind; // ALL
67
ExeContext* lastchange; // Mallocd
68
DrdThreadId stack_tid; // Stack
69
SegInfo* seginfo; // Segment
70
Char name[256]; // Segment
71
Char descr[256]; // Segment
75
#ifdef OLD_RACE_DETECTION_ALGORITHM
76
/* Records info about a data race. */
78
ThreadId tid1; // Thread ID of first thread involved in the data race.
79
ThreadId tid2; // Thread ID of second thread involved in the data race.
80
Addr range_begin; // Start address of range involved.
81
Addr range_end; // Last address (exclusive) of range involved.
82
UInt range_access; // How the range was accessed (LHS_[RW] | RHS_[RW]).
87
ThreadId tid; // Thread ID of the running thread.
88
Addr addr; // Conflicting address in current thread.
89
SizeT size; // Size in bytes of conflicting operation.
90
BmAccessTypeT access_type; // Access type: load or store.
108
void describe_addr(Addr const a, SizeT const len, AddrInfo* const ai);
109
Char* describe_addr_text(Addr const a, SizeT const len, AddrInfo* const ai,
110
Char* const buf, UInt const n_buf);
111
#ifdef OLD_RACE_DETECTION_ALGORITHM
112
void drd_report_data_race(const DataRaceInfo* const dri);
114
//void drd_report_data_race2(const DataRaceErrInfo* const dri);
115
void drd_register_error_handlers(void);
118
#endif /* __DRD_ERROR_H */