GSoc GDB pretty printers: Automatic testing and printing class pointers
Ingo Klöcker
kloecker at kde.org
Fri Jul 2 11:12:14 BST 2021
On Freitag, 2. Juli 2021 11:55:41 CEST Thomas Baumgart wrote:
> c) Then I ran
>
> gdb -batch -x autotest > ground.truth
>
> and made sure that the content of ground.truth is what I expected. The
> file here contains
>
> ---8<---
> Breakpoint 1 at 0x400ec8: file qstring.cpp, line 7.
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
>
> Breakpoint 1, main (argc=1, argv=0x7fffffffd908) at qstring.cpp:7
> 7 QString str("firstString");
> 8 QList<QString> flist;
> $1 = "firstString"
> 9 flist.append(str);
> $2 = "firstString"
> $3 = <empty>
> 10 flist.append("second");
> 11 flist.append("third");
> 13 QList<QString> alist{ "thsit", "ssfldsf", "sfsfs"};
> $4 = {"firstString", "second", "third"}
> ---8<---
The addresses, e.g. 0x400ec8 and 0x7fffffffd908 will most likely change
between runs. To avoid false positives when looking for differences, you could
mask them (e.g. 0x400ec8 with 0xXXXXXX) in the ground truth data and in the
test output.
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20210702/bd04c46a/attachment.sig>
More information about the Kde-finance-apps
mailing list