The Gaudi Framework  master (37c0b60a)
LibSymbolInfo.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 // LibSymbolInfo.h: interface for the CLibSymbolInfo class.
12 //
14 
15 #if !defined( AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_ )
16 # define AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_
17 
18 # include <iostream>
19 # include <string>
20 
21 # include <assert.h>
22 # include <stdio.h>
23 # include <windows.h>
24 
26 public:
28  virtual ~CLibSymbolInfo();
29  BOOL DumpSymbols( LPTSTR lpszLibPathName, std::ostream& pFile );
30  std::string GetLastError() const;
31 
32 protected:
35 
36  BOOL Dump( LPTSTR lpszLibPathName, std::ostream& pFile );
37  BOOL IsRegularLibSymbol( PSTR pszSymbolName );
38  BOOL IsFiltedSymbol( std::string& pszSymbolName );
39  DWORD ConvertBigEndian( DWORD bigEndian );
40 };
41 
43 
45 public:
46  MEMORY_MAPPED_FILE( PSTR pszFileName );
47  ~MEMORY_MAPPED_FILE( void );
48 
49  PVOID GetBase( void ) { return m_pMemoryMappedFileBase; }
50  DWORD GetFileSize( void ) { return m_cbFile; }
51  BOOL IsValid( void ) { return errMMF_NoError == m_errCode; }
53 
54 private:
55  HANDLE m_hFile;
56  HANDLE m_hFileMapping; // Handle of memory mapped file
58  DWORD m_cbFile;
60 };
61 
63 
64 #endif // !defined(AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_)
MEMORY_MAPPED_FILE::GetFileSize
DWORD GetFileSize(void)
Definition: LibSymbolInfo.h:50
MEMORY_MAPPED_FILE::GetBase
PVOID GetBase(void)
Definition: LibSymbolInfo.h:49
std::string
STL class.
MEMORY_MAPPED_FILE::m_cbFile
DWORD m_cbFile
Definition: LibSymbolInfo.h:58
CLibSymbolInfo::DumpSymbols
BOOL DumpSymbols(LPTSTR lpszLibPathName, std::ostream &pFile)
Definition: LibSymbolInfo.cpp:47
MEMORY_MAPPED_FILE::m_errCode
errMMF m_errCode
Definition: LibSymbolInfo.h:59
errMMF_NoError
@ errMMF_NoError
Definition: LibSymbolInfo.h:42
CLibSymbolInfo::CLibSymbolInfo
CLibSymbolInfo()
Definition: LibSymbolInfo.cpp:31
MEMORY_MAPPED_FILE::MEMORY_MAPPED_FILE
MEMORY_MAPPED_FILE(PSTR pszFileName)
Definition: LibSymbolInfo.cpp:181
MEMORY_MAPPED_FILE::~MEMORY_MAPPED_FILE
~MEMORY_MAPPED_FILE(void)
Definition: LibSymbolInfo.cpp:223
errMMF_FileMapping
@ errMMF_FileMapping
Definition: LibSymbolInfo.h:42
CLibSymbolInfo::~CLibSymbolInfo
virtual ~CLibSymbolInfo()
Definition: LibSymbolInfo.cpp:33
CLibSymbolInfo::IsFiltedSymbol
BOOL IsFiltedSymbol(std::string &pszSymbolName)
Definition: LibSymbolInfo.cpp:152
MEMORY_MAPPED_FILE
Definition: LibSymbolInfo.h:44
CLibSymbolInfo
Definition: LibSymbolInfo.h:25
std::ostream
STL class.
PMEMORY_MAPPED_FILE
MEMORY_MAPPED_FILE * PMEMORY_MAPPED_FILE
Definition: LibSymbolInfo.h:62
CLibSymbolInfo::IsRegularLibSymbol
BOOL IsRegularLibSymbol(PSTR pszSymbolName)
Definition: LibSymbolInfo.cpp:140
CLibSymbolInfo::ConvertBigEndian
DWORD ConvertBigEndian(DWORD bigEndian)
Definition: LibSymbolInfo.cpp:168
MEMORY_MAPPED_FILE::IsValid
BOOL IsValid(void)
Definition: LibSymbolInfo.h:51
MEMORY_MAPPED_FILE::m_hFileMapping
HANDLE m_hFileMapping
Definition: LibSymbolInfo.h:56
CLibSymbolInfo::m_strErrorMsg
std::string m_strErrorMsg
Definition: LibSymbolInfo.h:34
errMMF
errMMF
Definition: LibSymbolInfo.h:42
CLibSymbolInfo::m_strResultsString
std::string m_strResultsString
Definition: LibSymbolInfo.h:33
errMMF_FileOpen
@ errMMF_FileOpen
Definition: LibSymbolInfo.h:42
CLibSymbolInfo::Dump
BOOL Dump(LPTSTR lpszLibPathName, std::ostream &pFile)
Definition: LibSymbolInfo.cpp:70
MEMORY_MAPPED_FILE::m_hFile
HANDLE m_hFile
Definition: LibSymbolInfo.h:55
errMMF_MapView
@ errMMF_MapView
Definition: LibSymbolInfo.h:42
MEMORY_MAPPED_FILE::GetErrorType
errMMF GetErrorType()
Definition: LibSymbolInfo.h:52
MEMORY_MAPPED_FILE::m_pMemoryMappedFileBase
PVOID m_pMemoryMappedFileBase
Definition: LibSymbolInfo.h:57
CLibSymbolInfo::GetLastError
std::string GetLastError() const
Definition: LibSymbolInfo.cpp:179