57 cin.getline(cBuf,
sizeof(cBuf)/
sizeof(cBuf[0]));
59 return (
input !=
"go");
78 const type_info&
t =
typeid( *p);
80 cout <<
"typeid of " <<
addr
81 <<
" is \"" <<
t.name() <<
"\"" << endl;
84 }
catch (exception& e) {
86 cout << e.what() << endl;
87 cout <<
"address " <<
addr
88 <<
" does not point to a dumpable object " << endl;
97 string section(
"DebugDumpBpt");
98 string value = cfg.
Get( section,
"enabled");
104 bool enabled = ((
value !=
"false") && (
value !=
"0"));
112 }
else if (
value ==
"all") {
119 list<string>::iterator it_loc;
120 for (it_loc = loc.begin(); it_loc != loc.end(); ++it_loc) {
122 list<string>::iterator it_range;
126 it_range =
range.begin();
132 if ((line >= from) && (line <= to)) {
144 cout <<
"Console Debug Dump Viewer" << endl << endl;
145 cout <<
"Stopped at " <<
location << endl;
146 cout <<
"current object: " << name <<
" = " <<
147 static_cast<const void*
>(curr_object) << endl << endl;
148 cout <<
"Available commands: " << endl;
149 cout <<
" t[ypeid] <address>" << endl;
150 cout <<
" d[ump] <address> <depth>" << endl;
152 cout <<
" b[reak]" << endl;
154 cout <<
" go" << endl << endl;
159 const char*
file,
int line)
167 list<string>::iterator it_cmnd;
183 cmnd0 = *(it_cmnd = cmnd.begin());
184 cmnd1 = (narg > 1) ? *(++it_cmnd) :
string(
"");
185 cmnd2 = (narg > 2) ? *(++it_cmnd) :
string(
"");
211 const type_info&
t =
typeid( *p);
213 string(
t.name()) +
" " + cmnd1,
depth);
215 cout <<
"Exception: Dump failed" << endl;
void DebugDumpText(ostream &out, const string &bundle, unsigned int depth) const
static CNcbiApplication * Instance(void)
Singleton method.
static unsigned char depth[2 *(256+1+29)+1]
static const char * str(char *buf, int n)
static const char location[]
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
bool x_GetInput(string &input)
const void * x_StrToPtr(const string &str)
void x_Info(const string &name, const CDebugDumpable *curr_object, const string &location)
bool x_CheckLocation(const char *file, int line)
void Bpt(const string &name, const CDebugDumpable *curr_object, const char *file, int line)
bool x_CheckAddr(const void *addr, bool report)
string GetName(void) const
Get the base entry name with extension (if any).
virtual const string & Get(const string §ion, const string &name, TFlags flags=0) const
Get the parameter value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static unsigned long StringToULong(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned long.
static Uint8 StringToUInt8(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to Uint8.
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
range(_Ty, _Ty) -> range< _Ty >
const GenericPointer< typename T::ValueType > T2 value
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
Process information in the NCBI Registry, including working with configuration files.