1c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
2c8259b85b701d25d72aabe9dc0a8154517f96913sewardj/*--------------------------------------------------------------------*/
3c8259b85b701d25d72aabe9dc0a8154517f96913sewardj/*--- Reading of syms & debug info from PDB-format files.          ---*/
4c8259b85b701d25d72aabe9dc0a8154517f96913sewardj/*---                                               priv_readpdb.h ---*/
5c8259b85b701d25d72aabe9dc0a8154517f96913sewardj/*--------------------------------------------------------------------*/
6c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
7c8259b85b701d25d72aabe9dc0a8154517f96913sewardj/*
8c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   This file is part of Valgrind, a dynamic binary instrumentation
9c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   framework.
10c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   Spring 2008:
11c8259b85b701d25d72aabe9dc0a8154517f96913sewardj      derived from readelf.c and valgrind-20031012-wine/vg_symtab2.c
12c8259b85b701d25d72aabe9dc0a8154517f96913sewardj      derived from wine-1.0/tools/winedump/pdb.c and msc.c
13c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
140f157ddb404bcde7815a1c5bf2d7e41c114f3d73sewardj   Copyright (C) 2000-2013 Julian Seward
15c8259b85b701d25d72aabe9dc0a8154517f96913sewardj      jseward@acm.org
16c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
17c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   This program is free software; you can redistribute it and/or
18c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   modify it under the terms of the GNU General Public License as
19c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   published by the Free Software Foundation; either version 2 of the
20c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   License, or (at your option) any later version.
21c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
22c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   This program is distributed in the hope that it will be useful, but
23c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   WITHOUT ANY WARRANTY; without even the implied warranty of
24c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   General Public License for more details.
26c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
27c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   You should have received a copy of the GNU General Public License
28c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   along with this program; if not, write to the Free Software
29c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
30c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   02111-1307, USA.
31c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
32c8259b85b701d25d72aabe9dc0a8154517f96913sewardj   The GNU General Public License is contained in the file COPYING.
33c8259b85b701d25d72aabe9dc0a8154517f96913sewardj*/
34c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
358b68b64759254d514d98328c496cbd88cde4c9a5njn#if defined(VGO_linux) || defined(VGO_darwin)
368b68b64759254d514d98328c496cbd88cde4c9a5njn
37c8259b85b701d25d72aabe9dc0a8154517f96913sewardj#ifndef __PRIV_READPDB_H
38c8259b85b701d25d72aabe9dc0a8154517f96913sewardj#define __PRIV_READPDB_H
39c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
40535fb1b49a80f2e880f755ee618381de3e222ddfflorian#include "pub_core_basics.h"     // Addr
41535fb1b49a80f2e880f755ee618381de3e222ddfflorian#include "pub_core_debuginfo.h"  // DebugInfo
42535fb1b49a80f2e880f755ee618381de3e222ddfflorian
43c8259b85b701d25d72aabe9dc0a8154517f96913sewardj/* Returns True if OK, False for any kind of failure. */
44c8259b85b701d25d72aabe9dc0a8154517f96913sewardjextern Bool ML_(read_pdb_debug_info)(
45c8259b85b701d25d72aabe9dc0a8154517f96913sewardj               DebugInfo* di,
46c8259b85b701d25d72aabe9dc0a8154517f96913sewardj               Addr       obj_avma,
4754c45db2f978055aeca91aaccb05aac825523e6csewardj               PtrdiffT   obj_bias,
48c8259b85b701d25d72aabe9dc0a8154517f96913sewardj               void*      pdbimage,
49c8259b85b701d25d72aabe9dc0a8154517f96913sewardj               SizeT      n_pdbimage,
50518850bf0da07ed3e2244e307268ae0fd80e93a8florian               const HChar* pdbname,
51c8259b85b701d25d72aabe9dc0a8154517f96913sewardj               ULong      pdbmtime
52c8259b85b701d25d72aabe9dc0a8154517f96913sewardj            );
53c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
5413ac96dea734b3933a73524b991ac64fb48a4d57sewardj/* Finds the name of the PDB file that's embedded with the specified
5513ac96dea734b3933a73524b991ac64fb48a4d57sewardj   PE file, or NULL on failure.  Caller deallocates with
5613ac96dea734b3933a73524b991ac64fb48a4d57sewardj   ML_(dinfo_free). */
57518850bf0da07ed3e2244e307268ae0fd80e93a8florianHChar* ML_(find_name_of_pdb_file)( const HChar* pename );
5813ac96dea734b3933a73524b991ac64fb48a4d57sewardj
5913ac96dea734b3933a73524b991ac64fb48a4d57sewardj
60c8259b85b701d25d72aabe9dc0a8154517f96913sewardj#endif /* ndef __PRIV_READPDB_H */
61c8259b85b701d25d72aabe9dc0a8154517f96913sewardj
628b68b64759254d514d98328c496cbd88cde4c9a5njn#endif // defined(VGO_linux) || defined(VGO_darwin)
638b68b64759254d514d98328c496cbd88cde4c9a5njn
64c8259b85b701d25d72aabe9dc0a8154517f96913sewardj/*--------------------------------------------------------------------*/
658b68b64759254d514d98328c496cbd88cde4c9a5njn/*--- end                                                          ---*/
66c8259b85b701d25d72aabe9dc0a8154517f96913sewardj/*--------------------------------------------------------------------*/
67