From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108396 invoked by alias); 21 Apr 2017 12:23:52 -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 108373 invoked by uid 89); 21 Apr 2017 12:23:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Apr 2017 12:23:49 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1XbH-0007ne-64 for gdb-patches@sourceware.org; Fri, 21 Apr 2017 08:23:50 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1Xb5-0007jH-9P; Fri, 21 Apr 2017 08:23:35 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1851 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d1Xb1-0003SR-21; Fri, 21 Apr 2017 08:23:32 -0400 Date: Fri, 21 Apr 2017 12:23:00 -0000 Message-Id: <83pog69cev.fsf@gnu.org> From: Eli Zaretskii To: Tim Wiederhake CC: gdb-patches@sourceware.org, markus.t.metzger@intel.com, brobecker@adacore.com, qiyaoltc@gmail.com In-reply-to: <1492771786-26372-7-git-send-email-tim.wiederhake@intel.com> (message from Tim Wiederhake on Fri, 21 Apr 2017 12:49:44 +0200) Subject: Re: [PATCH v2 6/8] Python: Move and rename gdb.BtraceInstruction Reply-to: Eli Zaretskii References: <1492771786-26372-1-git-send-email-tim.wiederhake@intel.com> < 1492771786-26372-7-git-send-email-tim.wiederhake@intel.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00606.txt.bz2 > From: Tim Wiederhake > Cc: markus.t.metzger@intel.com, brobecker@adacore.com, qiyaoltc@gmail.com > Date: Fri, 21 Apr 2017 12:49:44 +0200 > > Remove gdb.BtraceInstruction and replace by gdb.RecordInstruction. > > 2017-04-21 Tim Wiederhake > > gdb/ChangeLog: > * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove. > (btpy_object, btpy_insn_type, btpy_new): Remove. > (btpy_list_object): Use gdb.RecordInstruction type instead of > gdb.BtraceInstruction type. > (btrace_insn_from_recpy_insn): New function. > (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of > btpy_new. > (btpy_call_new, btpy_list_item): Do not use btpy_new anymore. > (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol, > btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling, > btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object > instead of btpy_object. > (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative, > btpy_insn_data, btpy_insn_decode): Rename to ... > (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size, > recpy_bt_insn_is_speculative, recpy_bt_insn_data, > recpy_bt_insn_decode): This. Also, use new helper functions. > (btpy_list_position, recpy_bt_goto): Use recpy_element_object and > recpy_insn_type. > (btpy_insn_getset): Remove. > (gdbpy_initialize_btrace): Remove code to initialize > gdb.BtraceInstruction. Use recpy_element_object. > * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal, > recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded, > recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export. > * python/py-record.c (recpy_insn_type): New static object. > (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data, > recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative, > recpy_element_number, recpy_element_hash, recpy_element_richcompare): > New function. > (recpy_insn_getset): New static object. > (gdbpy_initialize_record): Initialize gdb.RecordInstruction. > * python/py-record.h (recpy_element_object): New typedef. > (recpy_insn_type, recpy_insn_new): New export. > > gdb/doc/ChangeLog: > * python.texi (Recording in Python): Replace gdb.BtraceInstruction with > gdb.RecordInstruction OK for the documentation part. Bonus points for fixing the @var{number} thing in the text you didn't touch. Thanks.