UTDebugSymbolInfo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _UT_DEBUG_SYMBOL_INFO_H_
00026 #define _UT_DEBUG_SYMBOL_INFO_H_
00027
00028
00029
00030
00031
00032 #include "UTPath.h"
00033
00034
00035
00036 class UT_EXPORT DebugSymbolInfo_t
00037
00043 {
00044
00045 public:
00046
00047 inline DebugSymbolInfo_t();
00049
00050 inline DebugSymbolInfo_t( byte* function_name_buf,
00051 int function_name_buf_size );
00056
00057 inline DebugSymbolInfo_t( byte* function_name_buf,
00058 int function_name_buf_size,
00059 byte* file_name_buf,
00060 int file_name_buf_size );
00065
00066 bool SetAddr( const void* address,
00067 bool collect_file_name = true,
00068 bool file_leaf_name_only = true );
00082
00083 inline const String_t& FunctionName() const;
00086
00087 inline uint32 FunctionOffset() const;
00090
00091 inline const Path_t& FileName() const;
00097
00098 inline uint32 FileLineNumber() const;
00103
00104
00105 private:
00106
00107 String_t m_function_name;
00108 uint32 m_function_offset;
00109 Path_t m_file_name;
00110 uint32 m_file_line_number;
00111
00112 friend class DebugSymbolInfoCacheEntry_t;
00113 };
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 inline
00126 DebugSymbolInfo_t::DebugSymbolInfo_t()
00127 {
00128 m_function_offset = 0xFFFFFFFF;
00129 m_file_line_number = 0;
00130 }
00131
00132
00133 inline
00134 DebugSymbolInfo_t::DebugSymbolInfo_t( byte* function_name_buf, int function_name_buf_size )
00135 : m_function_name( function_name_buf, function_name_buf_size )
00136 {
00137 m_function_offset = 0xFFFFFFFF;
00138 m_file_line_number = 0;
00139 }
00140
00141
00142 inline
00143 DebugSymbolInfo_t::DebugSymbolInfo_t( byte* function_name_buf,
00144 int function_name_buf_size,
00145 byte* file_name_buf,
00146 int file_name_buf_size )
00147 : m_function_name( function_name_buf, function_name_buf_size ),
00148 m_file_name( file_name_buf, file_name_buf_size )
00149 {
00150 m_function_offset = 0xFFFFFFFF;
00151 m_file_line_number = 0;
00152 }
00153
00154
00155 inline const String_t&
00156 DebugSymbolInfo_t::FunctionName() const
00157 {
00158 assert( m_function_name.LengthBytes() );
00159 return m_function_name;
00160 }
00161
00162
00163 inline uint32
00164 DebugSymbolInfo_t::FunctionOffset() const
00165 {
00166 return m_function_offset;
00167 }
00168
00169
00170 inline const Path_t&
00171 DebugSymbolInfo_t::FileName() const
00172 {
00173 return m_file_name;
00174 }
00175
00176
00177 inline uint32
00178 DebugSymbolInfo_t::FileLineNumber() const
00179 {
00180 return m_file_line_number;
00181 }
00182
00183
00184 #endif // _UT_DEBUG_SYMBOL_INFO_H_