This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Python: Remove ptid from gdb.Record interface


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a3be24ad59d683d1b08df28e093739743a7cf256

commit a3be24ad59d683d1b08df28e093739743a7cf256
Author: Tim Wiederhake <tim.wiederhake@intel.com>
Date:   Tue May 2 11:35:54 2017 +0200

    Python: Remove ptid from gdb.Record interface
    
    As discussed here: https://sourceware.org/ml/gdb-patches/2017-04/msg00166.html

Diff:
---
 gdb/ChangeLog                                 |  5 +++++
 gdb/doc/ChangeLog                             |  4 ++++
 gdb/doc/python.texi                           |  7 -------
 gdb/python/py-record.c                        | 11 -----------
 gdb/testsuite/ChangeLog                       |  4 ++++
 gdb/testsuite/gdb.python/py-record-btrace.exp |  1 -
 6 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d4741b0..de0b6d4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 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.
 	* python/py-record-btrace.c: Add "py-record.h" include.
 	(recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 9be035c..c13418a 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -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
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index ce5810e..8c246a4 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -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}.
diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c
index 63cd293..05f028c 100644
--- a/gdb/python/py-record.c
+++ b/gdb/python/py-record.c
@@ -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.",
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index dac5b2e..5312707 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
 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.
 	* gdb.python/py-record-btrace-threads.exp: New file.
 
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index 7752cac..ecc8bdf 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -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" ".*"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]