binutils-gdb/gdb/testsuite/gdb.python
Andrew Burgess baf8791efb gdb/python: Reuse gdb.RegisterGroup objects where possible
Only create one gdb.RegisterGroup Python object for each of GDB's
reggroup objects.

I could have added a field into the reggroup object to hold the Python
object pointer for each reggroup, however, as reggroups are never
deleted within GDB, and are global (not per-architecture) a simpler
solution seemed to be just to hold a single global map from reggroup
pointer to a Python object representing the reggroup.  Then we can
reuse the objects out of this map.

After this commit it is possible for a user to tell that two
gdb.RegisterGroup objects are now identical when previously they were
unique, however, as both these objects are read-only I don't think
this should be a problem.

There should be no other user visible changes after this commit.

gdb/ChangeLog:

	* python/py-registers.c : Add 'unordered_map' include.
	(gdbpy_new_reggroup): Renamed to...
	(gdbpy_get_reggroup): ...this.  Update to only create register
	group descriptors when needed.
	(gdbpy_reggroup_iter_next): Update.

gdb/testsuite/ChangeLog:

	* gdb.python/py-arch-reg-groups.exp: Additional tests.
2020-07-21 21:57:08 +01:00
..
amd64-py-framefilter-invalidarg.S
lib-types.cc
lib-types.exp
py-arch-reg-groups.exp gdb/python: Reuse gdb.RegisterGroup objects where possible 2020-07-21 21:57:08 +01:00
py-arch-reg-names.exp gdb/python: Reuse gdb.RegisterDescriptor objects where possible 2020-07-21 21:57:08 +01:00
py-arch.c
py-arch.exp
py-as-string.c
py-as-string.exp
py-bad-printers.c
py-bad-printers.exp
py-bad-printers.py
py-block.c
py-block.exp
py-breakpoint-create-fail.c
py-breakpoint-create-fail.exp
py-breakpoint-create-fail.py
py-breakpoint.c
py-breakpoint.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-caller-is.c
py-caller-is.exp
py-cmd.c
py-cmd.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-completion.exp
py-completion.py
py-error.exp
py-error.py
py-events-shlib.c
py-events.c
py-events.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-events.py
py-evsignal.exp
py-evthreads.c
py-evthreads.exp
py-explore-cc.exp
py-explore.c
py-explore.cc
py-explore.exp
py-finish-breakpoint2.cc
py-finish-breakpoint2.exp
py-finish-breakpoint2.py
py-finish-breakpoint.c
py-finish-breakpoint.exp
py-finish-breakpoint.py
py-format-string.c
py-format-string.exp Fix TCL error in gdb.python/py-format-string.exp. 2020-06-17 13:43:32 -07:00
py-format-string.py
py-frame-args.c
py-frame-args.exp
py-frame-args.py
py-frame-inline.c
py-frame-inline.exp
py-frame.c
py-frame.exp
py-framefilter-gdb.py.in
py-framefilter-invalidarg-gdb.py.in
py-framefilter-invalidarg.exp
py-framefilter-invalidarg.py
py-framefilter-mi.c
py-framefilter-mi.exp
py-framefilter.c
py-framefilter.exp
py-framefilter.py
py-function.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-inferior.c
py-inferior.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-infthread.c
py-infthread.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-lazy-string.c
py-lazy-string.exp
py-linetable.c
py-linetable.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-linetable.S
py-lookup-type.exp
py-mi-events-gdb.py
py-mi-events.c
py-mi-events.exp
py-mi-objfile-gdb.py
py-mi-objfile.c
py-mi-objfile.exp
py-mi-var-info-path-expression.c
py-mi-var-info-path-expression.exp
py-mi-var-info-path-expression.py
py-mi.exp
py-nested-maps.c
py-nested-maps.exp
py-nested-maps.py
py-objfile-script-gdb.py
py-objfile-script.c
py-objfile-script.exp
py-objfile.c
py-objfile.exp
py-parameter.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-pp-integral.c Improve -Wunused-value testcase build failures fix 2020-06-23 15:11:27 +01:00
py-pp-integral.exp
py-pp-integral.py
py-pp-maint.c
py-pp-maint.exp
py-pp-maint.py
py-pp-re-notag.c Improve -Wunused-value testcase build failures fix 2020-06-23 15:11:27 +01:00
py-pp-re-notag.exp
py-pp-re-notag.py
py-pp-registration.c
py-pp-registration.exp
py-pp-registration.py
py-prettyprint.c
py-prettyprint.exp
py-prettyprint.py
py-progspace.c
py-progspace.exp
py-prompt.c
py-prompt.exp
py-rbreak-func2.c
py-rbreak.c
py-rbreak.exp
py-record-btrace-threads.c
py-record-btrace-threads.exp
py-record-btrace.c
py-record-btrace.exp
py-record-full.c
py-record-full.exp
py-recurse-unwind.c
py-recurse-unwind.exp
py-recurse-unwind.py
py-rvalue-ref-value-cc.cc
py-rvalue-ref-value-cc.exp
py-section-script.c
py-section-script.exp
py-section-script.py
py-shared-sl.c
py-shared.c
py-shared.exp
py-strfns.c
py-strfns.exp
py-symbol-2.c
py-symbol.c
py-symbol.exp
py-symtab.exp
py-sync-interp.c
py-sync-interp.exp
py-template.cc
py-template.exp
py-thrhandle.c
py-thrhandle.exp
py-type.c
py-type.exp
py-typeprint.cc
py-typeprint.exp
py-typeprint.py
py-unwind-inline.c gdb: Python unwinders, inline frames, and tail-call frames 2020-07-06 15:06:07 +01:00
py-unwind-inline.exp gdb: Python unwinders, inline frames, and tail-call frames 2020-07-06 15:06:07 +01:00
py-unwind-inline.py gdb: Python unwinders, inline frames, and tail-call frames 2020-07-06 15:06:07 +01:00
py-unwind-maint.c
py-unwind-maint.exp
py-unwind-maint.py
py-unwind.c
py-unwind.exp
py-unwind.py gdb/python: Add architecture method to gdb.PendingFrame 2020-07-06 15:06:05 +01:00
py-value-cc.cc
py-value-cc.exp
py-value.c
py-value.exp Fix test breakages caused by removal of gdb_py_test_multiple. 2020-06-30 18:40:21 +02:00
py-xmethods.cc
py-xmethods.exp
py-xmethods.py
python-1.c
python.c
python.exp Make test names unique in python.exp and guile.exp 2020-06-26 22:04:46 +02:00
source1
source2.py
tui-window.exp
tui-window.py