more information in backtraces

Christoph Feck christoph at maxiom.de
Thu Jul 5 14:57:50 BST 2012


On Thursday 05 July 2012 15:39:33 Dominik Haumann wrote:
> Hi,
> 
> in Kate, we have a (virtual) Cursor class:
> 
> class Cursor
> {
>   // public functions
> 
>   private:
>     int m_line;
>     int m_column
> };
> 
> Unfortunately, in backtraces by Dr. Konqi we only get:
> #11 0x00007f1c85128b2a in KateLayoutCache::updateViewCache
> (this=0x54db630, startPos=..., newViewLineCount=35,
> viewLinesScrolled=<optimized out>)
> 
> Here, startPos is a Cursor, but we cannot see its values.
> 
> It would help tremendously sometimes to know the line/column
> values. So having "startPos=(4, 2)" instead of "startPos=...".
> 
> Is there any way to provide this feature to get better backtraces
> by default in Dr. Konqi?

You have to compile with -O0, afaik. Otherwise trivial code gets 
inlined, arguments stay in registers, and you cannot get them in the 
backtrace.

> 
> In gdb itslef, there are addons that already provide some pretty
> printing through KDevelop:
> https://projects.kde.org/projects/extragear/kdevelop/kdevelop/repos
> itory/revisions/master/show/debuggers/gdb/printers (file kde4.py)
> Maybe this can be reused?
> 
> Thanks,
> Dominik

Christoph Feck (kdepepo)
KDE Quality Team




More information about the kde-core-devel mailing list