Page 1 of 1

Debuging see numbers always in HEX and string as text

Posted: Sat Jan 25, 2014 9:59 pm
by gkourtis
During debugging in codelite I need to see numbers always as hexadecimal.
I need to keep sets of variables created in the watch panel.
I need to see variables of type string or wstring as the contained string without need to expand the variable.
And I need also not to have two separate views for locals and watch but only one !!

HOW DO I DO IT

My OS is ubuntu uname gives:
3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Re: Debuging see numbers always in HEX and string as text

Posted: Sat Jan 25, 2014 10:15 pm
by eranif
gkourtis wrote:During debugging in codelite I need to see numbers always as hexadecimal.
I need to keep sets of variables created in the watch panel.
I need to see variables of type string or wstring as the contained string without need to expand the variable.
HOW DO I DO IT
You forgot to mention your OS/codelite version etc

To be able to view the string properly (without expanding it) you need to enable python pretty printing:

1. Make sure your gdb supports python pretty printing
2. From codelite's menu bar: Settings->GDB->Enable pretty printing

Note that by default codelite uses the CTRL (CMD on OSX) to enable tooltips when hovering a variable/expression

To view numbers in hex (base 16) format:
project settings->common settings->debugger->startup commands
and add this line:

Code: Select all

set output-radix 16
Note that this will affect only the current project. If you want to set it globally to affect all workspaces and projects:
settings->GDB settings->startup commands
and put the same line as above

Eran

Re: Debuging see numbers always in HEX and string as text

Posted: Sat Jan 25, 2014 10:52 pm
by gkourtis
Hex works ok
I enabled the flag but python pretty printing does not work.
What do I have to do in my platform ?

Re: Debuging see numbers always in HEX and string as text

Posted: Sat Jan 25, 2014 11:06 pm
by eranif
Please read this:
HOW TO POST

Eran

Re: Debuging see numbers always in HEX and string as text

Posted: Sat Jan 25, 2014 11:19 pm
by gkourtis
OS: 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux ( I already said it before )
CodeLite 5.4 (downloaded as update )
Language used C++ ( compiler g++ and clang ).

Re: Debuging see numbers always in HEX and string as text

Posted: Sat Jan 25, 2014 11:44 pm
by eranif
From the HOW TO POST:
1) If it is a 'Debugger' related bug, make sure to also post:
The full debugger log - enable the 'full debugger logging' option, reproduce your problem and paste the output from the 'Debugger' view ("Output" tab) window to your post (from settings -> debugger settings -> GNU gdb debugger -> misc -> enable full debugger logging)
Your GDB version
Eran