diff options
author | Enze Li <enze.li@hotmail.com> | 2022-06-12 13:25:31 +0800 |
---|---|---|
committer | Enze Li <enze.li@hotmail.com> | 2022-06-18 11:23:16 +0800 |
commit | 3f52a09075e3c62f2150375bb7fca338e7db45e7 (patch) | |
tree | 634d8aeccb4849832ed116c34762167c530bd750 /gdb/doc | |
parent | 153b3c1117d02c2893c5be1b3af53ec7f161a211 (diff) | |
download | gdb-3f52a09075e3c62f2150375bb7fca338e7db45e7.zip gdb-3f52a09075e3c62f2150375bb7fca338e7db45e7.tar.gz gdb-3f52a09075e3c62f2150375bb7fca338e7db45e7.tar.bz2 |
gdb/python: Export nibbles to python layer
This patch makes it possible to allow Value.format_string() to return
nibbles output.
When we set the parameter of nibbles to True, we can achieve the
displaying binary values in groups of every four bits.
Here's an example:
(gdb) py print (gdb.Value (1230).format_string (format='t', nibbles=True))
0100 1100 1110
(gdb)
Note that the parameter nibbles is only useful if format='t' is also used.
This patch also includes update to the relevant testcase and
documentation.
Tested on x86_64 openSUSE Tumbleweed.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/python.texi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 62db5f2..9e2e97b 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -1105,6 +1105,11 @@ union} in @ref{Print Settings}). address, @code{False} if it shouldn't (see @code{set print address} in @ref{Print Settings}). +@item nibbles +@code{True} if binary values should be displayed in groups of four bits, +known as nibbles. @code{False} if it shouldn't (@pxref{Print Settings, +set print nibbles}). + @item deref_refs @code{True} if C@t{++} references should be resolved to the value they refer to, @code{False} (the default) if they shouldn't. Note that, unlike |