I wonder if there is any way to print errno
symbolic name instead of just a number in GDB. For example, instead of
errno = 13
I would like to see something like
EACCES
Assuming you have a recent GDB with embedded Python, you can use the Python interpreter to do what you want.
The following (untested) code should be about right:
(gdb) python import errno
(gdb) python print errno.errorcode[13]
You should be able to define a python command, e.g. perrno
, that will cut down on typing. Documentation here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With