Add address keyword to Value.format_string
authorHannes Domani <ssbssa@yahoo.de>
Fri, 18 Dec 2020 16:23:06 +0000 (17:23 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Fri, 18 Dec 2020 21:04:16 +0000 (22:04 +0100)
commit4aea001fd84a05f1e552c5dea1025e3f62dd2d7e
tree27ae942e59baf13662d1cf7217f511d407f297d3
parentb3f9469bfa42ef352e1d96f8733817242dd41a2e
Add address keyword to Value.format_string

This makes it possible to disable the address in the result string:

const char *str = "alpha";

(gdb) py print(gdb.parse_and_eval("str").format_string())
0x404000 "alpha"
(gdb) py print(gdb.parse_and_eval("str").format_string(address=False))
"alpha"

gdb/ChangeLog:

2020-12-18  Hannes Domani  <ssbssa@yahoo.de>

* python/py-value.c (valpy_format_string): Implement address keyword.

gdb/doc/ChangeLog:

2020-12-18  Hannes Domani  <ssbssa@yahoo.de>

* python.texi (Values From Inferior): Document the address keyword.

gdb/testsuite/ChangeLog:

2020-12-18  Hannes Domani  <ssbssa@yahoo.de>

* gdb.python/py-format-string.exp: Add tests for address keyword.
gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/python.texi
gdb/python/py-value.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-format-string.exp
This page took 0.026266 seconds and 4 git commands to generate.