Print whole string In GDB

M

meendar

i am using GDB for debugging a cpp program, while debuggind i need to
print a string, but it only prints part of the string , is there any
possiblity so i can print the whole string to a file .

(gdb)p str1
$3 = 0x96744d8 "d('loadingError').style.display = 'block';\n\n\n\n
\ndocument.cookie = 'GMAIL_JSLE=1'\n}\n},\n\n\nRecordLoadingTime :
function(opt_index) {\nopt_index = opt_index != null ? opt_index :
MainPage.pageLoadingTimes.l"...

I wanted to print the whole string instead of part of the string.

Any help?

Thanks in Advance
 
N

Nemanja Trifunovic

i am using GDB for debugging a cpp program, while debuggind i need to
print a string, but it only prints part of the string , is there any
possiblity

Look at the x command, instead of p. It prints a block of the memory
and you specify the length of the block.
 

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
474,189
Messages
2,571,016
Members
47,618
Latest member
Leemorton01

Latest Threads

Top