[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-finance-apps
Subject:    Installing extra debugging symbols to use with printers
From:       Da Viper <yerimyah1 () gmail ! com>
Date:       2021-07-12 14:50:13
Message-ID: CAEtKUfhWkvE5ViT2BLmOOEWbwRGQFgEVOtEoLOcTCg=FWhGHNg () mail ! gmail ! com
[Download RAW message or body]

**Using Debugging symbols or not**

**Current Situation**

Some types in QT does not have any information when it is printed out, take
for example `QFile`

we create a QFile like below
```c++
    QFile file("/a/path/to/some/place");
```
if try to print this is `GDB` it returns
```gdb
    (gdb) p file
    $1 = <incomplete type>
```

There are two ways which this problem can be solved i either read the
important variables directly from the memory location or i install
debugging symbols

I am not sure which do, so i ask for some input.

**Why not to use**

- currently i have not seen any pretty printer that requires you to install
debugging symbols in order to use it. (Qt creator or Microsoft visual
studio or existing qt printers do not)
- some distros do not have debugging symbols for qt in its repositories,
e.g arch linux, manjaro but requires you to add another repo
- the debugging process becomes slower than when the symbols are added
(core-dbgsym for console, gui-dbgsym for gui, charts etc this gets slower
the more you add)


**Why to use**

- you can be able to access internal variables with ease
- you can be sure the structure would be the same if there is a new version
(although qt does not change often but some times do if there is a major
version)
- the structure is the same irrespective of the operating system or
architecture

[Attachment #3 (text/html)]

<div dir="ltr">**Using Debugging symbols or not**<div><br>**Current \
Situation**<br><br>Some types in QT does not have any information when it is printed \
out, take for example `QFile`<br><br>we create a QFile like below<br>```c++<br>      \
QFile file(&quot;/a/path/to/some/place&quot;);<br>```<br>if try to print this is \
`GDB` it returns<br>```gdb<br>      (gdb) p file<br>      $1 = &lt;incomplete \
type&gt;<br>```<br><br>There are two ways which this problem can be solved i either \
read the important variables directly from the memory location or i install debugging \
symbols<br><br>I am not sure which do, so i ask for some input.<br><br>**Why not to \
use**<br><br>- currently i have not seen any pretty printer that requires you to \
install debugging symbols in order to use it. (Qt creator or Microsoft visual studio \
or existing qt printers do not)<br>- some distros do not have debugging symbols for \
qt in its repositories, e.g arch linux, manjaro but requires you to add another \
repo<br>- the debugging process becomes slower than when the symbols are added \
(core-dbgsym for console, gui-dbgsym for gui, charts etc this gets slower the more \
you add)<br><br><br>**Why to use**<br><br>- you can be able to access internal \
variables with ease<br>- you can be sure the structure would be the same if there is \
a new version (although qt does not change often but some times do if there is a \
major version)<br>- the structure is the same irrespective of the operating system or \
architecture</div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic