From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6734 invoked by alias); 16 Sep 2011 07:55:52 -0000 Received: (qmail 6721 invoked by uid 22791); 16 Sep 2011 07:55:51 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Sep 2011 07:55:35 +0000 Received: by fxh17 with SMTP id 17so1606605fxh.0 for ; Fri, 16 Sep 2011 00:55:34 -0700 (PDT) Received: by 10.223.10.25 with SMTP id n25mr2169421fan.72.1316159734148; Fri, 16 Sep 2011 00:55:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.123.2 with HTTP; Fri, 16 Sep 2011 00:54:54 -0700 (PDT) From: Hui Zhu Date: Fri, 16 Sep 2011 08:13:00 -0000 Message-ID: Subject: [doc/tracepoint] Change *$esp@300 to *(unsigned char *)$esp@300. To: gdb-patches ml Cc: Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 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: 2011-09/txt/msg00286.txt.bz2 Hi, I found that if want collect stack in tracepoint action like doc said will got error. collect $rsp@512 Left operand of `@' must be an object in memory. But change to: collect *(unsigned char *)$rsp@512 Will fix it. So I make a patch for doc. Please help me review it. Thanks, Hui 2011-09-16 Hui Zhu * gdb.texinfo (Tracepoint Restrictions): Change *$esp@300 to *(unsigned char *)$esp@300. --- doc/gdb.texinfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/doc/gdb.texinfo +++ b/doc/gdb.texinfo @@ -10627,7 +10627,7 @@ by @code{ptr}. @item It is not possible to collect a complete stack backtrace at a tracepoint. Instead, you may collect the registers and a few hundred -bytes from the stack pointer with something like @code{*$esp@@300} +bytes from the stack pointer with something like @code{*(unsigned char *)$esp@@300} (adjust to use the name of the actual stack pointer register on your target architecture, and the amount of stack you wish to capture). Then the @code{backtrace} command will show a partial backtrace when