Showing registers, and broken debugger output

General questions regarding the usage of CodeLite
ghost
CodeLite Enthusiast
Posts: 20
Joined: Wed May 28, 2014 9:58 pm
Genuine User: Yes
IDE Question: C++
Contact:

Showing registers, and broken debugger output

Post by ghost » Wed May 28, 2014 10:05 pm

Hello, I want to show current registers values while debugging.
For this the only way I found is to directly enter "info reg" in the "Output" pane with the manual "Send".
This works, but the gdb output parsing is badly readble, as the special characters and not parsed correctly:

Code: Select all

rax            0x0
\t0

rbx            0x0
\t0

rcx            0xffffffffffffffff
\t-1

rdx            0x7ffff78bb9e0
\t140737346517472

..............
in manual gdb debugging, this is shown as

Code: Select all

rax            0x0	0
rbx            0x0	0
rcx            0xffffffffffffffff	-1
rdx            0x7ffff78bb9e0	140737346517472
this is for every manual gdb commands sent into the terminal.

Is there any other way to show registers in a more readble way? A "Registers" tab would be the best!
Also the output parsing should be fixed...
Thanks
Bye

User avatar
eranif
CodeLite Plugin
Posts: 5930
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by eranif » Thu May 29, 2014 9:44 am

ghost wrote:Also the output parsing should be fixed...
The output is OK. Its just codelite uses the Machine Interface of gdb and not the standard CLI
The equivalent command that should be used (again, it was intended for machine to parse not you ;) ) is:

Code: Select all

-data-list-register-values --skip-unavailable N
Eran
Make sure you have read the HOW TO POST thread

ghost
CodeLite Enthusiast
Posts: 20
Joined: Wed May 28, 2014 9:58 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by ghost » Thu May 29, 2014 10:59 am

Ok, I supposed codelite is using the MI, but is it not possible to parse the gdb output to print it in a readble form, in general?
after all, it seems only necessary the print \t as a real tabulation and not to print a newline.

and again, my thumb up for a "registers" pane! :-)

User avatar
eranif
CodeLite Plugin
Posts: 5930
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by eranif » Thu May 29, 2014 11:39 am

Already started looking at this and the initial commit was done this morning:

https://github.com/eranif/codelite/comm ... 7e44948a3f

It will probably be ready today (no promises ;) )

Eran
Make sure you have read the HOW TO POST thread

ghost
CodeLite Enthusiast
Posts: 20
Joined: Wed May 28, 2014 9:58 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by ghost » Thu May 29, 2014 12:28 pm

Wow, great!
What do you think about the "pretty printing" of the GDB output?
I find ofter useful to directly send commands to GDB, for example to inspect registers, loaded objects (info shared), disassemble, etc, and it would be useful to have a human-readble output, with correct \n and \t...
Thanks
Bye

User avatar
eranif
CodeLite Plugin
Posts: 5930
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by eranif » Thu May 29, 2014 12:34 pm

ghost wrote:What do you think about the "pretty printing" of the GDB output?
This probably won't be implemented (patches are welcomed ;))
codelite starts GDB simply starts with a different interpreter (--interperter=mi) so unless we plan on parsing and fixing _all_ the output from GDB, this is just too much of work

Eran
Make sure you have read the HOW TO POST thread

ghost
CodeLite Enthusiast
Posts: 20
Joined: Wed May 28, 2014 9:58 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by ghost » Thu May 29, 2014 12:58 pm

Just my guess, but is it not enough to replace non-printable characters like \t and \n ?
I mean only in the output window, all the normal internal parsing of GBD commands would remain the same.

User avatar
eranif
CodeLite Plugin
Posts: 5930
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by eranif » Fri May 30, 2014 9:31 pm

This feature (registers view) is not in git head
dis.png
Eran
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread

ghost
CodeLite Enthusiast
Posts: 20
Joined: Wed May 28, 2014 9:58 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by ghost » Tue Jun 03, 2014 12:04 pm

Hi, saw the new 6.0 and liked very much both new compiler detection and register view :-)

Just a question: do you plan to compile it also for Ubuntu 12.04 ?
I have some VM around with it, I have to decide to upgrade to 14.04 or stick with it....

User avatar
eranif
CodeLite Plugin
Posts: 5930
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Showing registers, and broken debugger output

Post by eranif » Tue Jun 03, 2014 12:28 pm

Our policy with Ubuntu is to keep the latest LTS + the last non LTS version.
So for codelite 6.0 we support: 13.10 + 14.04
And ofc, 14.04 will kept until the next LTS is out

Supporting various distros is a big effort and with our very limited man power (me and David...) its just too much.
Each release consumes a lot of time from David as he builds and packages for all Linux distros (as you know, Linux does not end with Ubuntu ;) )

Eran
Make sure you have read the HOW TO POST thread

Post Reply