From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73431 invoked by alias); 21 Apr 2017 10:50:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 73351 invoked by uid 89); 21 Apr 2017 10:50:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mga04.intel.com Received: from mga04.intel.com (HELO mga04.intel.com) (192.55.52.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Apr 2017 10:50:09 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2017 03:50:07 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 21 Apr 2017 03:50:05 -0700 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id v3LAo5OJ023774; Fri, 21 Apr 2017 11:50:05 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id v3LAo4Z9026657; Fri, 21 Apr 2017 12:50:04 +0200 Received: (from twiederh@localhost) by ulvlx001.iul.intel.com with œ id v3LAo4Rm026653; Fri, 21 Apr 2017 12:50:04 +0200 From: Tim Wiederhake To: gdb-patches@sourceware.org Cc: markus.t.metzger@intel.com, brobecker@adacore.com, qiyaoltc@gmail.com Subject: [PATCH v2 4/8] Python: Remove ptid from gdb.Record interface Date: Fri, 21 Apr 2017 10:50:00 -0000 Message-Id: <1492771786-26372-5-git-send-email-tim.wiederhake@intel.com> In-Reply-To: <1492771786-26372-1-git-send-email-tim.wiederhake@intel.com> References: <1492771786-26372-1-git-send-email-tim.wiederhake@intel.com> X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00595.txt.bz2 As discussed here: https://sourceware.org/ml/gdb-patches/2017-04/msg00166.html 2017-04-21 Tim Wiederhake gdb/ChangeLog: * python/py-record.c (recpy_ptid): Remove. (recpy_record_getset): Remove recpy_ptid. gdb/doc/ChangeLog: * python.texi (Recording in Python): Remove Record.ptid defvar. gdb/testsuite/ChangeLog: * gdb.python/py-record-btrace.exp: Remove Record.ptid test. --- gdb/doc/python.texi | 7 ------- gdb/python/py-record.c | 11 ----------- gdb/testsuite/gdb.python/py-record-btrace.exp | 1 - 3 files changed, 19 deletions(-) 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 586687a..bef0784 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 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/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" ".*" -- 2.7.4