Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Patch for codeblocks 20.03 adding multi columns in memory dump
MicroSourceCode:
How slow, only an experiment can show, for example, copying 10 mb of any data.
At the moment, the start of displaying an image is possible only by modifying the program code itself. This is not particularly difficult, you need to write a procedure that receives input and output from the debugger and runs the callback function, as an example, you can see how this is done for the CPU Registers dialog and other debugger windows.
Ideally, the codeblocks program should have a generic approach for doing this, providing the ability to custom filter input and output from the debugger for plugins.
oBFusCATed:
--- Quote from: MicroSourceCode on February 24, 2021, 02:06:05 pm ---How slow, only an experiment can show, for example, copying 10 mb of any data.
--- End quote ---
I know it is slow. Especially if gdb prints the data on multiple rows as it likes to do. :)
Also I know why it happens. :)
MicroSourceCode:
I changed the behavior of my patch, now the memory dump list remembers its previous position, and returns to this position during step-by-step debugging. Here is the code for wxTextCtrl:
int w, h, clientHeight;
m_pText->GetClientSize(&w, &h);
clientHeight = (h + (h % m_pText->GetCharHeight())) / m_pText->GetCharHeight();
unsigned maxScrollPosition = m_pText->GetScrollRange(wxVERTICAL)- h + 2;
unsigned position = m_pText->GetScrollPos(wxVERTICAL);
if ( position < maxScrollPosition )
{
int result = position / m_pText->GetCharHeight() + clientHeight;
int parttext, col;
parttext = m_pText->GetLineLength(m_pText->GetNumberOfLines() / 2) + 1;
col = result < m_result ? m_result - result : result - m_result;
if ( col > 2 )
m_result = result;
m_pText->ShowPosition(m_result * parttext - parttext + 1);
The code works correctly on my machine, if the font of the list is 10 pt or more, if less then it can be easily adapted.
ollydbg:
Some more information, there is a project: OpenImageDebugger, which can show in-memory OpenCV image or Eigen matrix, I see it has some code to run a TCP server, it's GUI is based on QT.
Another Visual studio visual debugger plugin awulkiew/graphical-debugging: GraphicalDebugging extension for Visual Studio, which can show many in memory data(such as int array, matrix)
MicroSourceCode:
OpenImageDebugger uses the same technology as the pretty printer, you need to define the variable for watch manually, or make an interface for this. As for the visual debugger plugin, I can't say anything.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version