From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19664 invoked by alias); 24 Aug 2010 02:10:51 -0000 Received: (qmail 19470 invoked by uid 22791); 24 Aug 2010 02:10:50 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_05,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Aug 2010 02:10:41 +0000 Received: by wwi14 with SMTP id 14so956654wwi.12 for ; Mon, 23 Aug 2010 19:10:39 -0700 (PDT) Received: by 10.216.54.193 with SMTP id i43mr149372wec.95.1282615839241; Mon, 23 Aug 2010 19:10:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.186.205 with HTTP; Mon, 23 Aug 2010 19:10:19 -0700 (PDT) From: Hui Zhu Date: Tue, 24 Aug 2010 02:10: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: 2010-08/txt/msg00401.txt.bz2 Hi, I found that *$esp@300 cannot work on GDB, for example: actions Enter actions for tracepoint 4, one per line. End with a line saying just "end". >collect *$esp@300 Attempt to dereference a generic pointer. But *(unsigned char *)$esp@300 can work: actions Enter actions for tracepoint 4, one per line. End with a line saying just "end". >collect *(unsigned char *)$esp@300 >end I make a patch for it. Please help me review it. Thanks, Hui 2010-08-24 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 @@ -10390,7 +10390,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