binutils-gdb/gdb/testsuite/gdb.python
Kevin Buettner 757bf54bb4 Test case for Inferior.thread_from_thread_handle
As the title says, this is a test case for
Inferior.thread_from_thread_handle, a python method which will,
given a thread library dependent thread handle, find the GDB thread
which corresponds to that thread handle (in the inferior under
consideration).

The C file for this test case causes the thread handles for the
main thread and two child threads to be placed into an array.  The
test case runs to one of the functions (do_something()) at which point,
it retrieves the thread handles from the array and attempts to find the
corresponding thread in GDB's internal thread list.

I use barriers to make sure that both threads have actually started;
execution will stop when one of the threads breaks at do_something.

Thanks to Simon Marchi for suggestions for forcing the thread
numbering to be stable.

gdb/testsuite/ChangeLog:

	* gdb.python/py-thrhandle.c, gdb.python/py-thrhandle.exp: New
	files.
2017-09-21 11:49:48 -07:00
..
amd64-py-framefilter-invalidarg.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
lib-types.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
lib-types.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-arch.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-arch.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-as-string.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-as-string.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-bad-printers.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-bad-printers.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-bad-printers.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-block.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-block.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint-create-fail.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint-create-fail.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint-create-fail.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-breakpoint.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-caller-is.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-caller-is.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-cmd.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-cmd.exp PR cli/21688: Detect aliases when issuing python/compile/guile commands (and fix last commit) 2017-06-30 09:31:21 -04:00
py-completion.exp gdb: Fix a few unstable test names 2017-03-08 12:46:44 +00:00
py-completion.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-error.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-error.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-events-shlib.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-events.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-events.exp PR python/13598 - add before_prompt event 2017-02-14 10:38:56 -07:00
py-events.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-evsignal.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-evthreads.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-evthreads.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-explore-cc.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-explore.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-explore.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-explore.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint2.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint2.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-finish-breakpoint2.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame-args.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame-args.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-frame-args.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame-inline.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame-inline.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-frame.c
py-frame.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-gdb.py.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-invalidarg-gdb.py.in update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-invalidarg.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-framefilter-invalidarg.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-mi.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter-mi.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-framefilter.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-framefilter.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-framefilter.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-function.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-inferior.c gdb/ 2012-07-26 19:09:35 +00:00
py-inferior.exp Add new_inferior, inferior_deleted, and new_thread events 2017-09-11 14:15:20 -06:00
py-infthread.c
py-infthread.exp Add new_inferior, inferior_deleted, and new_thread events 2017-09-11 14:15:20 -06:00
py-lazy-string.c gdb.python/py-lazy-string (pointer): Really add new typedef. 2017-03-16 10:43:21 -07:00
py-lazy-string.exp Fix various python lazy string bugs. 2017-03-16 09:28:11 -07:00
py-linetable.S update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-linetable.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-linetable.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-lookup-type.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-events-gdb.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-events.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-events.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-objfile-gdb.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-objfile.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi-objfile.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-mi.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-objfile-script-gdb.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-objfile-script.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-objfile-script.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-objfile.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-objfile.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-parameter.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-integral.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-integral.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-integral.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-maint.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-maint.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-pp-maint.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-re-notag.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-re-notag.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-re-notag.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-registration.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-pp-registration.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-pp-registration.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-prettyprint.c Fix type casts losing typedefs and reimplement "whatis" typedef stripping 2017-08-21 11:34:32 +01:00
py-prettyprint.exp Fix type casts losing typedefs and reimplement "whatis" typedef stripping 2017-08-21 11:34:32 +01:00
py-prettyprint.py Fix type casts losing typedefs and reimplement "whatis" typedef stripping 2017-08-21 11:34:32 +01:00
py-progspace.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-progspace.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-prompt.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-prompt.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-record-btrace-threads.c Python: Use correct ptid in btrace recording 2017-05-02 11:35:54 +02:00
py-record-btrace-threads.exp Fix gdb.python/py-record-btrace-threads.exp with Python 3 2017-05-04 16:02:36 +01:00
py-record-btrace.c python: Add tests for record Python bindings 2017-02-14 10:57:56 +01:00
py-record-btrace.exp Python: Move and rename gdb.BtraceFunction 2017-05-02 11:35:54 +02:00
py-record-full.c python: Add tests for record Python bindings 2017-02-14 10:57:56 +01:00
py-record-full.exp python: Add tests for record Python bindings 2017-02-14 10:57:56 +01:00
py-recurse-unwind.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-recurse-unwind.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-recurse-unwind.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-rvalue-ref-value-cc.cc Add rvalue reference tests and docs 2017-03-20 13:47:59 -07:00
py-rvalue-ref-value-cc.exp Add rvalue reference tests and docs 2017-03-20 13:47:59 -07:00
py-section-script.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-section-script.exp Fix warning: Invalid entry in .debug_gdb_scripts section 2017-03-29 21:53:43 +02:00
py-section-script.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-shared-sl.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-shared.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-shared.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-strfns.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-strfns.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-symbol.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-symbol.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-symtab.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-sync-interp.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-sync-interp.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-template.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-template.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-thrhandle.c Test case for Inferior.thread_from_thread_handle 2017-09-21 11:49:48 -07:00
py-thrhandle.exp Test case for Inferior.thread_from_thread_handle 2017-09-21 11:49:48 -07:00
py-type.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-type.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-typeprint.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-typeprint.exp Change method of loading .py files in Python tests 2017-01-26 16:12:12 -05:00
py-typeprint.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind-maint.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind-maint.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind-maint.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-unwind.exp gdb.python/py-unwind: Disable stack protection 2017-07-22 00:01:03 +02:00
py-unwind.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-value-cc.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-value-cc.exp update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-value.c Fix various python lazy string bugs. 2017-03-16 09:28:11 -07:00
py-value.exp Fix various python lazy string bugs. 2017-03-16 09:28:11 -07:00
py-xmethods.cc update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
py-xmethods.exp Fix Python test to use lowercase command 2017-02-10 12:24:35 -07:00
py-xmethods.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
python-1.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
python.c update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
python.exp Make gdb.python/python.exp more robust 2017-01-20 13:15:36 -06:00
source1 update copyright year range in GDB files 2017-01-01 10:52:34 +04:00
source2.py update copyright year range in GDB files 2017-01-01 10:52:34 +04:00