From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129480 invoked by alias); 21 Mar 2017 13:07:56 -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 129457 invoked by uid 89); 21 Mar 2017 13:07:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy==e5=b0=a7, Issues, offer?= X-HELO: mail-wr0-f177.google.com Received: from mail-wr0-f177.google.com (HELO mail-wr0-f177.google.com) (209.85.128.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Mar 2017 13:07:53 +0000 Received: by mail-wr0-f177.google.com with SMTP id u108so111592820wrb.3 for ; Tue, 21 Mar 2017 06:07:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=CxnOgOYsJw8D/yOsd48T/nIMcuSh+YmxM7ElU4bnBfA=; b=pwarlYsvM9cBxFIHEo02ntNI9afOQlxBgR41vi/9ITiCfoAZ3wScX8xQFSp9xK94GC vB1MMM2K8mGq8iP5MhbUQAIeLv7DQHFjPtDmkWFdm27bcojON1hXl8Xh8EXKzR99wWpr evktaA0f3W7Gf8+BHc4EyFPMw/8LCzcp8Tz8jw7SMuAJyenXfx95n+PGMfQ1FFrtV7ee 9krJ3yjefKV5uCJPxiPBPem1Vp0f17UqHlJWtIlhG+uUP/Ttk6USX8L3HbCJ/Szti1th n7bgIbAw0Swr1aU3cnC4Hk1ch68I7wcLPiuTe+TcFYWNPAzbYz7I9NI+CS2h3gLFjf73 Dbjw== X-Gm-Message-State: AFeK/H32+siMlNkbyTcCickxHPxHCqkER9KKTSyH1Jv25ICtrPFq8TrBC1Y2ajCTKdv/dg== X-Received: by 10.223.170.210 with SMTP id i18mr33117416wrc.114.1490101672468; Tue, 21 Mar 2017 06:07:52 -0700 (PDT) Received: from E107787-LIN ([194.214.185.158]) by smtp.gmail.com with ESMTPSA id s17sm25068925wrc.25.2017.03.21.06.07.51 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 21 Mar 2017 06:07:51 -0700 (PDT) From: Yao Qi To: Joel Brobecker Cc: "gdb-patches\@sourceware.org" , "Wiederhake\, Tim" , xdje42@gmail.com Subject: Re: GDB 8.0 release/branching 2017-03-20 update References: <20170320201629.pbjzaqsnvs7dx7f2@adacore.com> Date: Tue, 21 Mar 2017 13:07:00 -0000 In-Reply-To: (Yao Qi's message of "Mon, 20 Mar 2017 22:39:12 +0000") Message-ID: <86zigevkv0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00366.txt.bz2 Yao Qi writes: [cc Doug who reviewed the patches v6] > I'll post my design draft tomorrow, then people can compare > the current design to mine. If we think we need to improve the > current design, it is unlikely to get it done by 8.0. Python APIs of record and btrace This summarizes the new added record and btrace Python APIs, in order to facilitate the discussion that whether we need to release them in 8.0. * Current status and design These new python APIs and classes are added to master already. BtraceInstruction { int number; int error; gdb.Symtab_and_line sal; pc, data, decoded, size; is_speculative; }; BtraceFunctionCall { int number; gdb.Symbol symbol; int level; BtraceInstruction instructions; BtraceFunctionCall up, prev_sibling, next_sibling; }; gdb.current_recording (), gdb.start_recording and gdb.stop_recording (), Record { ptid; format; begin, end; replay_position; instruction_history, function_call_history; }; * Issues in the APIs and suggestions 1. BtraceInstruction.sal is not necessary. It can be got via gdb.find_pc_line(BtraceInstruction.pc). 2. BtraceInstruction has some attributes (pc, data, decoded, and size,) which are not btrace related. They should be moved to a new class gdb.Instruction and BtraceInstruction extends it. Instruction { pc, data, decode, size; }; BtraceInstruction : Instruction { int number; int error; is_speculative; }; gdb.Instruction can be used in somewhere else, for example, we can add a function Inferior.read_code (address), which returns gdb.Instruction. The record of other methods, like "full", can get its own instructions, but they have to be extended from gdb.Instruction. Just like gdb.FinishBreakpoint extends gdb.Breakpoint. 3. Why does Record have an attribute ptid? Other record method may have process-wide record/trace. I'd like to put common attributes in Record, and extend Record for each specific record method. Record { method, format; instruction_history; }; BtraceRecord : Record { ptid; ... }; FullRecord : Record { }; gdb.current_recording () can be a factory returning the right Record object according to target_record_method (inferior_ptid). * Actions According to my analysis above, these APIs still need some adjustments and re-designs, so I request to revert these commits below, cee59b3 Fix break on Python 2 0a0faf9 Add documentation for new record Python bindings. 714aa61 python: Add tests for record Python bindings 75c0bdf python: Implement btrace Python bindings for record history. 4726b2d python: Create Python bindings for record history. and add them back gradually after 8.0 release. To be clear, I can offer some times review the new design and patches later, but I don't take over this project, Tim is still the owner. --=20 Yao (=E9=BD=90=E5=B0=A7)