1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00
Commit Graph

3 Commits

Author SHA1 Message Date
Simon Tatham
4262ce45ca gdb.py: support functions for container_of and tree234.
The gdb version of container_of can do better than the C function,
because you don't have to specify the structure field name if it can
be inferred from the type of the input expression.

And $list234 can be made to automatically list the contents of each
tree element, not just a pointer to it - just the thing for looking
quickly through sktree or s->channels to find the one you're after.
2018-11-16 19:22:43 +00:00
Simon Tatham
734ada9b57 gdb.py: add a 'memdump' command.
This makes it easier for me to examine the contents of binary memory
buffers, while debugging through code that does crypto or packet
marshalling.
2018-06-09 14:20:33 +01:00
Simon Tatham
10a4f1156c Add a GDB Python script to pretty-print Bignum.
I've been playing around with GDB's Python scripting system recently,
and this is a thing I've always thought it would be nice to be able to
do: if you load this script (which, on Ubuntu 18.04's gdb, is as
simple as 'source contrib/gdb.py' at the gdb prompt, or similar), then
variables of type Bignum will be printed as (e.g.) 'Bignum(0x12345)',
or 'Bignum(NULL)' if they're null pointers, or a fallback
representation if they're non-null pointers but gdb can't read
anything sensible from them.
2018-06-04 19:10:57 +01:00