Page 1 of 1

PATCH: No reposition editor after add watch

Posted: Sun Sep 12, 2010 9:49 am
by foxmuldr
Per bug 3059778 reported by me on SourceForge CodeLite bug tracker, patch offered.

Re: PATCH: No reposition editor after add watch

Posted: Sun Sep 12, 2010 7:39 pm
by eranif
Applied

Eran

Re: PATCH: No reposition editor after add watch

Posted: Sun Sep 12, 2010 9:19 pm
by eranif
I found a regression using this patch:
If I start a new debug sessions while I already have 'watches' from the previous debug session, codelite does not show the green arrow. I have to manually click on the 'Show Current Line' button in the debugger tool.
Until this is fixed, I am changed this code:

Code: Select all

UpdateFileLine(event.m_file, event.m_line, ManagerST::Get()->GetRepositionEditor());
into this:

Code: Select all

UpdateFileLine(event.m_file, event.m_line, true);
Eran

Re: PATCH: No reposition editor after add watch

Posted: Mon Sep 13, 2010 1:02 pm
by foxmuldr
eranif wrote:I found a regression using this patch:
If I start a new debug sessions while I already have 'watches' from the previous debug session, codelite does not show the green arrow. I have to manually click on the 'Show Current Line' button in the debugger tool.
Could the system be setup to raise a flag when the debugger starts called "m_debuggerHasRestarted" and a count called "m_debuggerCallbacks" indicating how many times it's been "activated" through an error or through a user stepping since the start of the debugger session? That way it could be tested the first time RefreshValues() is called and always force the refresh. It may also provide interesting / useful statistics (debugger cycles, debugger up-time, efficiency, etc.).

Also, on my install (Ubuntu 10.04 Linux), CodeLite doesn't update the green arrow ever until it reaches a breakpoint or an error. And in my version, it is always updating the display when that happens and I never have to click the "show current line" button. How are you using the debugger to have it not show the green arrow?

In the alternative, here's a patch which only calls RefreshValues(false) from OnNewWatch() and OnDisplayFormat(), and from cl_editor.cpp when the user right-clicks or selects the menu to add a watch. Everywhere else uses the default/old RefreshValues() functionality, which forces the full editor position refresh.

- Rick

Re: PATCH: No reposition editor after add watch

Posted: Mon Sep 13, 2010 1:08 pm
by eranif
foxmuldr wrote:Could the system be setup to raise a flag when the debugger starts called "m_debuggerHasRestarted" and a count called "m_debuggerCallbacks" indicating how many times it's been "activated" through an error or through a user stepping since the start of the debugger session? That way it could be tested the first time RefreshValues() is called and always force the refresh. It may also provide interesting / useful statistics (debugger cycles, debugger up-time, efficiency, etc.).
The interaction with the debugger is done in an async mode. A counter can be added, but I'd rather use it only for statistics.
The order of the replies is not guaranteed.
foxmuldr wrote:In the alternative, here's a patch which only calls RefreshValues(false) from OnNewWatch() and OnDisplayFormat(), and from cl_editor.cpp when the user right-clicks or selects the menu to add a watch. Everywhere else uses the default/old RefreshValues() functionality, which forces the full editor position refresh.
This sounds like a better alternative, I will give it a try

Eran

Re: PATCH: No reposition editor after add watch

Posted: Sun Sep 19, 2010 12:12 pm
by foxmuldr
eranif wrote:This sounds like a better alternative, I will give it a try
Was this patch ever applied?

Re: PATCH: No reposition editor after add watch

Posted: Wed Sep 22, 2010 5:52 pm
by eranif
foxmuldr wrote:Was this patch ever applied?
the original patch yes, the latest one: not yet. I will apply it on my local copy and test it as soon as I find some spare time

Eran