]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Python: Remove ptid from gdb.Record interface
authorTim Wiederhake <tim.wiederhake@intel.com>
Tue, 2 May 2017 09:35:54 +0000 (11:35 +0200)
committerTim Wiederhake <tim.wiederhake@intel.com>
Tue, 2 May 2017 09:35:54 +0000 (11:35 +0200)
As discussed here: https://sourceware.org/ml/gdb-patches/2017-04/msg00166.html

gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/python.texi
gdb/python/py-record.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-record-btrace.exp

index d4741b043c0cc685f2dce9c3a49a21bf49a35ba3..de0b6d47e3afca2191f63f88d2cad20f351c6118 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+       * python/py-record.c (recpy_ptid): Remove.
+       (recpy_record_getset): Remove recpy_ptid.
+
 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
 
        * btrace.c (btrace_fetch): Set inferior_ptid.
index 9be035c892793f5168189ed89355c6fae5c4dcef..c13418a07cd3309c444300233bbeb0dbcc133e61 100644 (file)
@@ -1,3 +1,7 @@
+2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+       * python.texi (Recording in Python): Remove Record.ptid defvar.
+
 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
 
        * gdb.texinfo (GDB/MI Thread Information): Add missing
index ce5810e45ff3965c4e716eccc22e5bfa5e9f3e2a..8c246a43719b685c99d1704c83d878c9cbdaf6e6 100644 (file)
@@ -3110,13 +3110,6 @@ currently active.  All record objects become invalid after this call.
 
 A @code{gdb.Record} object has the following attributes:
 
-@defvar Record.ptid
-ID of the thread associated with this object as a tuple of three integers.  The
-first is the Process ID (PID); the second is the Lightweight Process ID (LWPID),
-and the third is the Thread ID (TID). Either the LWPID or TID may be 0, which
-indicates that the operating system does not use that identifier.
-@end defvar
-
 @defvar Record.method
 A string with the current recording method, e.g.@: @code{full} or
 @code{btrace}.
index 63cd293c5d37a69e4697d9d0aa98b1af208fa502..05f028c033c80e0f85f2415c32bbc5fc92ef9553 100644 (file)
@@ -29,16 +29,6 @@ static PyTypeObject recpy_record_type = {
   PyVarObject_HEAD_INIT (NULL, 0)
 };
 
-/* Implementation of record.ptid.  */
-
-static PyObject *
-recpy_ptid (PyObject *self, void* closure)
-{
-  const recpy_record_object * const obj = (recpy_record_object *) self;
-
-  return gdbpy_create_ptid_object (obj->ptid);
-}
-
 /* Implementation of record.method.  */
 
 static PyObject *
@@ -161,7 +151,6 @@ Rewind to given location."},
 /* Record member list.  */
 
 static gdb_PyGetSetDef recpy_record_getset[] = {
-  { "ptid", recpy_ptid, NULL, "Current thread.", NULL },
   { "method", recpy_method, NULL, "Current recording method.", NULL },
   { "format", recpy_format, NULL, "Current recording format.", NULL },
   { "replay_position", recpy_replay_position, NULL, "Current replay position.",
index dac5b2e399fea8ff31acb1d7b9e591db17747970..5312707e78a2fe497a603e63158fd88e5f5e5f13 100644 (file)
@@ -1,3 +1,7 @@
+2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
+
+       * gdb.python/py-record-btrace.exp: Remove Record.ptid test.
+
 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
 
        * gdb.python/py-record-btrace-threads.c: New file.
index 7752cac5b796aa8af818ccc7957e3846ba1d4d5c..ecc8bdf5081b067807dc044cbcff5575204d08fc 100644 (file)
@@ -59,7 +59,6 @@ with_test_prefix "preopened record btrace" {
 
 with_test_prefix "prepare record" {
     gdb_test_no_output "python r = gdb.start_recording(\"btrace\")"
-    gdb_test "python print(len(r.ptid))" "3"
     gdb_test "python print(r.method)" "btrace"
     gdb_test "python print(r.format)" "pt|bts"
     gdb_test "stepi 100" ".*"