GDB Printers: Unintialized variable in gdb
Da Viper
yerimyah1 at gmail.com
Tue Aug 24 16:27:34 BST 2021
There is a QDateTime printer that requires calling a method to get useful
values.
The problem is when I call the method from gdb the printer crashes because
the variable does not exist yet thus the method does not exist in memory.
Is there a way to check if a variable has been initialised ?
I have tried `info locals` but that shows all the variable in the current
frame.
I have tried to try and except the error like so
```
try:
call method here
except Exception:
```
But the Sigsegv exception is not a python exception
I tried checking if the address is null but it's a valid address.
What I am try to mimick is something similar to the LLDB `SBValue.isValid()`
sbValue is similar to gdb.Value but for lldb
see
https://lldb.llvm.org/python_reference/lldb.SBValue-class.html
https://lldb.llvm.org/cpp_reference/classlldb_1_1SBValue.html#ae8d3e7cce0a22bd1fd59db8e3f37af7c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20210824/00986ea0/attachment.htm>
More information about the Kde-finance-apps
mailing list