|
|
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » GDB_MI2 debugger fixes
Re: GDB_MI2 debugger fixes [message #41984 is a reply to message #41981] |
Sun, 09 February 2014 18:25 |
Oblivion
Messages: 1112 Registered: August 2007
|
Senior Contributor |
|
|
klugier wrote on Sun, 09 February 2014 17:20 | Hello Massimo,
Quote: |
Are you SURE that you're running THIS build and not another, installed one on your system ???
|
It seems that gtk backend on KDE cause this issue. When I switch to X11 debug mode closes correctly.
So this is definitly not Gdb_MI2 issue.
Quote: |
I've just tested your build, but here it works perfectly.
No lags switching panes (I don't know what do you mean with "while debugging", panes are not there when debugger is not running....) and on application exit the debugger terminates correctly.
|
How to reproduce?
1. Start debugging.
2. Back to IDE.
3. Try to switch between following panes: Autos, Locals, Watches and Explorer. (Debug mode)
4. Now, you can stop debugging.
Sincerely,
Klugier
|
I can confirm this. I am also working on KDE 4.12 (latest Upp SVN 6888). When working with TheIDE on GTK+ backend, sometimes debug mode (GDB_MI2) does not quit. Panes stays where they are.
Also,
1) Is the disasm removed from the new GDB_MI2 interface, because the right pane where a disassembler should be, is almost empty (Shows only stack pointer, etc.) ? It only works with the legacy gdb interface.
2) There is no yellow pointer arrow (which shows the current position) on breakpoints with the new interface. Is it removed too? If so, it makes debugging a lot harder, since I have to rely on intuition.
Other than these, it seems really improved, thanks for your work!
Regards.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 09 February 2014 18:28] Report message to a moderator
|
|
|
|
Re: GDB_MI2 debugger fixes [message #41986 is a reply to message #41985] |
Sun, 09 February 2014 19:36 |
|
Klugier
Messages: 1082 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hi Massimo,
On Ubuntu 13.10 GDB_MI2 works perfect (I have tested with VirtualBox).
But on all my KDE machines debugging has got "lag panes" issue.
Massimo can you test IDE on Kubuntu or other KDE distribution via for example VirtualBox?
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Sun, 09 February 2014 19:55] Report message to a moderator
|
|
|
Re: GDB_MI2 debugger fixes [message #41987 is a reply to message #41985] |
Mon, 10 February 2014 01:38 |
Oblivion
Messages: 1112 Registered: August 2007
|
Senior Contributor |
|
|
Hello Massimo,
I dug through the TheIDE's code and found the main reason behind the two problems I've mentioned above.
Both problems seem to be a result of a localization/internationalization issue.
You see, My upp dir is under a directory which has some Turkish letters in its name. Both Gdb_MI2::SyncIde() and Gdb_MI2::SyncDisas() methods call the MICmd() method to fill MIValue structures, which seem to have a "file" (tuple?) member in it. But calling the MICmd() method returns a file path and if that path has non-ascii characters, it converts them to a number value (utf or unicode?).
Please find the attached screenshot, which I believe can explain the problem better. In the screenshot, as you will see, because the path doesn't actually exist (the path should not be ".../Geli305237tirme/Ultimate++/...", theide does not call disas.Add().
If I move the Ultimate++ directory under, say, /home/user/ directory everything works fine.
Shouldn't these "localized path" issues be taken care of by theide? Or is this a GDB issue?
(After more investigation: It seems that this is a gdb issue. Gdb uses the numeric representations of non-ascii characters in paths.)
Regards.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Mon, 10 February 2014 01:50] Report message to a moderator
|
|
|
Re: GDB_MI2 debugger fixes [message #41993 is a reply to message #41987] |
Mon, 10 February 2014 09:13 |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi Oblivion,
this is quite weird.... but I stumbled on a problem with gdb and localization too. It returns (normally, without a prettyprinter python code for it...) decimal number localized, so with ',' instead of '.' in italian, which made parsing of expression data almost impossible.
As I don't use special characters in my filenames I've never seen your problem.
I'll test it when finished with my 'this' explorer pane, probably in a couple of days.
p.s.: the MIValue is a kind of value class that is able to parse and hold gdb data responses. 'tuple' is the equivalent (almost...) of python tuples : { a b }, nothing to do with localization. Probably the problem is inside path handling.
Klugier, about your 'lag' problems, I'll see if I find some time to setup a virtualbox with kde. I don't want to clobber my ubuntu setup with another shell
Can't you try to debug it to locate the problem ?
Ciao
Max
|
|
|
|
Re: GDB_MI2 debugger fixes [message #42026 is a reply to message #42004] |
Tue, 11 February 2014 21:58 |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi all,
I've just uploaded a major debugger revision.
Changes:
1) The lag switching tabs should be gone
2) Stepping speed greatly enhanced
3) Added explorer pane for 'this' variable
4) Removed (disabled by now..) python prettyprinters, they will be replaced by c++ modules
5) Removed usage of GDB variables... they're both too slow and too buggy... now variabled are evaluated by gdb command '-data-evaluate-expression', by far faster even if much more difficult to parse results
By now, of Upp types, just the String is pretty printed, all other types are accessible by internal variables.
I'll try to extend it for most common types, probably implementing some plugin mechanics.
Please test and give suggestions!
Ciao
Max
p.s.: still experimental, even if better than before, so expect some bugs.....
[Updated on: Tue, 11 February 2014 21:59] Report message to a moderator
|
|
|
|
Re: GDB_MI2 debugger fixes [message #42046 is a reply to message #42026] |
Thu, 13 February 2014 11:16 |
Oblivion
Messages: 1112 Registered: August 2007
|
Senior Contributor |
|
|
Quote: |
Changes:
1) The lag switching tabs should be gone
2) Stepping speed greatly enhanced
3) Added explorer pane for 'this' variable
4) Removed (disabled by now..) python prettyprinters, they will be replaced by c++ modules
5) Removed usage of GDB variables... they're both too slow and too buggy... now variabled are evaluated by gdb command '-data-evaluate-expression', by far faster even if much more difficult to parse results
|
Hi Massimo,
Thanks for your work!
Currently, with TheIDE (6913), on Arch Linux (kernel v: 3.12.10, KDE 4.12, i686, with no SSE2):
1) Yes, lags are gone. At least in X11 mode. GTK mode in theIDE is so laggy in general that I can't use, so I can't say if there's any noticable speed up there (I mean, TheIDE (GTK), especially the code editor and debugger is laggy to an unusable degree on my machine, but it has nothing to do with debugger per se).
2) Yes, stepping speed is greatly enhanced. Only the first initialization takes a relatively long time (4-5 seconds).
3) This pane and type evaluators seem to work, and is handy.
I've encountered some seemingly random dead locks (happens when I run/exit the same apps several times in debug mode). Unfortunately I couldn't determine the cause yet.
Regards.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Thu, 13 February 2014 11:19] Report message to a moderator
|
|
|
|
Re: GDB_MI2 debugger fixes [message #42048 is a reply to message #42047] |
Thu, 13 February 2014 14:23 |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi Oblivion and Krugier,
I just noticed slow down when there are many arrays/maps to in 'this' inspector.... gdb needs to be called in several times and that's slow.
I've to decide if it's better to not show first container's elements or to just abort their operation if some event is in queue.
The first is easy but I find handy to see first elements in arrays and maps without having to inspect the variable... the second seems quite hard to achieve.
The alternative would be to add a checkbox on settings page for it.... what is your opinion ?
In my PC for a really complex 'this' class it takes less than half a second without containers evaluation, and more than 5-6 seconds if I have some 10 containers to evaluate, which is clearly too much time.
Ah, tooltips are disabled by now, I'm still implementing them in a fast way, it'll be ready in short time.
About general lags, I have theide in GTK mode and I don't notice any of them....
Ciao
Max
p.s.: Klugier, the 'first pane switching' is not lagging, probably you've got many containers in your class. It's the evaluation that is slow. You'll notice the lag also when stepping, after each quick step (about 0.5 seconds after last step, when re-evaluation begins).
[Updated on: Thu, 13 February 2014 14:25] Report message to a moderator
|
|
|
|
Re: GDB_MI2 debugger fixes [message #42133 is a reply to message #42100] |
Sun, 23 February 2014 01:02 |
|
Klugier
Messages: 1082 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Massimo,
It seems, that GDB initializing is slower than previous. (Kubuntu 13.10 - KDE 4.11).
I measured initializing time using my watch. It takes around 15 seconds (5 times for 3 seconds!), so it seems that it consumes too much time. And I don't know how to fix it.
Like I noticed several post ago. This code generates slow KDE initializing time.
MIValue Gdb_MI2::ReadGdb(bool wait)
{
String output, s;
MIValue res;
if(wait)
{
// blocking path
// waits for 3 seconds max, then return empty value
// some commands (in particular if they return python exceptions)
// have a delay between returned exception text and command result
// so we shall wait up to the final (gdb)
int retries = 3; // 13 * 50; // <- This variable is too big for KDE. Max retries is always executed at startup.
while(dbg && retries--)
{
dbg->Read(s);
output += s;
if(TrimRight(s).EndsWith("(gdb)"))
break;
Sleep(20);
continue;
}
}
else if(dbg)
dbg->Read(output);
if(output.IsEmpty())
return res;
return ParseGdb(output);
}
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Sun, 23 February 2014 01:18] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 13:17:55 CEST 2024
Total time taken to generate the page: 0.08807 seconds
|
|
|