How to call string member function inside debugger?

W

wenmang

Hi,

I am debugging through a code and I like to know what is default memory
allocated by string default allocator when constructed through its
default ctor. I have stirng object, but cannot call upon it to access
its capacity:
debugger> p myData1

{

_String_base::_M_start=NULL

_String_base::_M_finish=NULL

_String_base::_M_end_of_storage=NULL

static basic_string::npos=4294967295

}
By looking at it, I have no clue how many chars(bytes) has been
allocated for it.
 
M

mlimber

I am debugging through a code and I like to know what is default memory
allocated by string default allocator when constructed through its
default ctor. I have stirng object, but cannot call upon it to access
its capacity:
debugger> p myData1

{

_String_base::_M_start=NULL

_String_base::_M_finish=NULL

_String_base::_M_end_of_storage=NULL

static basic_string::npos=4294967295

}
By looking at it, I have no clue how many chars(bytes) has been
allocated for it.
From that printout, I would guess no memory has been allocated. NULL
means nothing.

Cheers! --M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top