From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24199 invoked by alias); 13 Dec 2010 13:00:52 -0000 Received: (qmail 24183 invoked by uid 22791); 13 Dec 2010 13:00:51 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Dec 2010 13:00:46 +0000 Received: (qmail 32351 invoked from network); 13 Dec 2010 13:00:45 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 13 Dec 2010 13:00:45 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [PATCH] Print trace state variables Date: Mon, 13 Dec 2010 13:00:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.33-29-realtime; KDE/4.4.5; x86_64; ; ) Cc: Joel Brobecker , Stan Shebs References: <4D015A4A.7040500@codesourcery.com> <20101211055510.GE2596@adacore.com> In-Reply-To: <20101211055510.GE2596@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012131300.42962.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2010-12/txt/msg00178.txt.bz2 On Saturday 11 December 2010 05:55:10, Joel Brobecker wrote: > Another potential issue to consider is precedence: If the user had > already defined an internal variable called "VAR", and then creates > a tracepoint variable with the same name, which one should we print > when he write "$VAR"? With your proposal, the tracepoint variable > hides the internal variable, right? For the archives, I'd like to point out explicitly that there's some precedence for this with registers: >./gdb (gdb) p $rax $1 = void (gdb) p $rax = 1 $2 = 1 (gdb) file gdb Reading symbols from /home/pedro/gdb/baseline/build/gdb/gdb...done. (gdb) p $rax No registers. (gdb) start Temporary breakpoint 1 at 0x4562f3: file ../../src/gdb/gdb.c, line 29. Starting program: /home/pedro/gdb/baseline/build/gdb/gdb [Thread debugging using libthread_db enabled] Temporary breakpoint 1, main (argc= During symbol reading, incomplete CFI data; unspecified registers (e.g., rax) at 0x4562e8. 1, argv=0x7fffffffe108) at ../../src/gdb/gdb.c:29 29 memset (&args, 0, sizeof args); (gdb) p $rax $3 = 12108976 -- Pedro Alves