From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1688 invoked by alias); 13 Nov 2015 14:55:51 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 1674 invoked by uid 89); 13 Nov 2015 14:55:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 13 Nov 2015 14:55:49 +0000 Received: by pabfh17 with SMTP id fh17so102400780pab.0 for ; Fri, 13 Nov 2015 06:55:47 -0800 (PST) X-Received: by 10.68.200.66 with SMTP id jq2mr32595240pbc.4.1447426547617; Fri, 13 Nov 2015 06:55:47 -0800 (PST) Received: from E107787-LIN (gcc2-power8.osuosl.org. [140.211.9.43]) by smtp.gmail.com with ESMTPSA id cs7sm20985272pad.35.2015.11.13.06.55.44 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 13 Nov 2015 06:55:47 -0800 (PST) From: Yao Qi To: "taylor\, david" Cc: "gdb\@sourceware.org" Subject: Re: (hardware) watchpoints and actions References: <64A9FD4472059B48AC8F38981B7DA5342EF9BD5F8C@MX37A.corp.emc.com> Date: Fri, 13 Nov 2015 14:55:00 -0000 In-Reply-To: <64A9FD4472059B48AC8F38981B7DA5342EF9BD5F8C@MX37A.corp.emc.com> (david taylor's message of "Wed, 11 Nov 2015 13:00:42 -0500") Message-ID: <86io56vthu.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: 2015-11/txt/msg00024.txt.bz2 "taylor, david" writes: > For instructions, GDB has breakpoints and tracepoints. For data, GDB has > watchpoints. It would be nice if there was a data equivalent of tracepoi= nts. > There is processor support for a limited number of small locations to > be watched. > The goal is to run at full speed until a watched location is accessed in = some > prescribed manner. At that time, like a tracepoint, execute some actions= to > collect information and then continue at full speed. This is a useful feature IMO. However, do we deal with the local variable? Like watchpoint, GDB should stop watching the address when the program goes out of the scope of the local variable. If GDB can only trace global variable, that is acceptable to me. > > I'd like for it to be a part of GDB and also to avoid the kludges. > > Two questions immediately come to mind: > > . what should the GDB user interface be? In CLI, we've already had "trace", "ftrace" and "strace", so the command can be "dtrace" (or "mtrace" if "dtrace" is misleading). In MI, -break-insert is to create breakpoint/tracepoint, probably we can add "-m" option for creating "data tracepoint". Beside tracepoint creation, we should think about finding traceframes via command 'tfind'. Nowadays, we have 'tfind pc', 'tfind outside' and 'tfind range'. How do these commands handle trace frames collected by "data tracepoint"? or what do 'tfind outside' and 'tfind range' mean regarding "data tracepoint"? We need to update the semantics "QTFrame" packet accordingly. > > . what should the remote protocol messages be? > We can reuse and extend QTDP to download "data tracepoint". > Opinions? Thoughts? --=20 Yao (=E9=BD=90=E5=B0=A7)