Hello. I've been using CodeBlocks for a long time. Recently I started setting it up in order to improve the GDB debugging performance, so I've configured various pretty printers. However, one thing that bugged me was that hovering a mouse over a pointer shows only the pointer address in the tooltip. Programmers are interested in the pointer content, not the address. Therefore, I've downloaded and compiled C::B code and run it through the debugger. I found the following code in gdb_commands.h, function GdbCmd_TooltipEvaluation::ParseOutput:
ParseGDBWatchValue(watch, contents);
if (!m_Address.empty() && m_autoDereferenced)
watch->SetValue(m_Address);
In case of a pointer, contents already contains the dereferenced value which is correctly stored in watch. However, the next two lines write the pointer address back into watch, so the tooltip shows only the address.
Simply by removing (commenting out) these two lines I was able to show the dereferenced pointer's content in the tooltip, without any side effects observed (except for null pointers that write the "Cannot access memory at 0x0" string). So my question is what are these lines needed for?
What do the devs think about this modification? Can it be made in the trunk? I think that it improves the debugging ergonomy, no need to use the watches panel.
Tested on python-enabled GNU gdb (GDB) 7.4.50.20120522-cvs, from this forum, on Windows XP.