Assuming you have recent GDB with built-in Python, you can use the Python interpreter to accomplish what you want.
The following (unverified) code must be right:
(gdb) python import errno
(gdb) python print errno.errorcode[13]
You should be able to define a python command, for example. perrnowhich will cut input. The documentation is here .
source
share