binutils-gdb/gdb/python
Hannes Domani 4aea001fd8 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.
2020-12-18 22:04:16 +01:00
..
lib/gdb
py-all-events.def
py-arch.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-auto-load.c default-args: allow to define default arguments for aliases 2020-06-22 21:14:13 +02:00
py-block.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-bpevent.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-breakpoint.c gdb/breakpoint: add flags to 'condition' and 'break' commands to force condition 2020-10-27 11:00:57 +01:00
py-cmd.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-continueevent.c
py-event-types.def
py-event.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-event.h Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-events.h Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-evtregistry.c
py-evts.c
py-exitedevent.c Don't use PyLong_FromLongLong 2020-09-15 11:08:57 -06:00
py-finishbreakpoint.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-frame.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-framefilter.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-function.c
py-gdb-readline.c
py-inferior.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-infevents.c Don't use PyLong_FromLongLong 2020-09-15 11:08:57 -06:00
py-infthread.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-instruction.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-instruction.h
py-lazy-string.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-linetable.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-newobjfileevent.c
py-objfile.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-param.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-prettyprint.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-progspace.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-record-btrace.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-record.h Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-ref.h
py-registers.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-signalevent.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-stopevent.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-stopevent.h gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-symbol.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-symtab.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-threadevent.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-tui.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
py-type.c Fix accessing a method's fields from Python 2020-12-18 22:02:13 +01:00
py-unwind.c Remove redundant typedefs 2020-12-04 13:12:56 -07:00
py-utils.c
py-value.c Add address keyword to Value.format_string 2020-12-18 22:04:16 +01:00
py-varobj.c Change varobj_item::value to a value_ref_ptr 2020-12-11 09:33:40 -07:00
py-xmethods.c gdb, gdbserver, gdbsupport: fix leading space vs tabs issues 2020-11-02 10:28:45 -05:00
python-config.py
python-internal.h Change varobj_dynamic::child_iter to unique_ptr 2020-12-11 09:33:40 -07:00
python.c Minor Python simplifications 2020-11-02 10:17:07 -07:00
python.h