* [doc/tracepoint] Change *$esp@300 to *(unsigned char *)$esp@300.
@ 2011-09-16 8:13 Hui Zhu
2011-09-16 8:57 ` Eli Zaretskii
2011-09-16 10:45 ` Pedro Alves
0 siblings, 2 replies; 4+ messages in thread
From: Hui Zhu @ 2011-09-16 8:13 UTC (permalink / raw)
To: gdb-patches ml; +Cc: Eli Zaretskii
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 <teawater@gmail.com>
* 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [doc/tracepoint] Change *$esp@300 to *(unsigned char *)$esp@300.
2011-09-16 8:13 [doc/tracepoint] Change *$esp@300 to *(unsigned char *)$esp@300 Hui Zhu
@ 2011-09-16 8:57 ` Eli Zaretskii
2011-09-16 9:36 ` Hui Zhu
2011-09-16 10:45 ` Pedro Alves
1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2011-09-16 8:57 UTC (permalink / raw)
To: Hui Zhu; +Cc: gdb-patches
> From: Hui Zhu <teawater@gmail.com>
> Date: Fri, 16 Sep 2011 15:54:54 +0800
> Cc: Eli Zaretskii <eliz@gnu.org>
>
> 2011-09-16 Hui Zhu <teawater@gmail.com>
>
> * gdb.texinfo (Tracepoint Restrictions): Change *$esp@300
> to *(unsigned char *)$esp@300.
OK.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [doc/tracepoint] Change *$esp@300 to *(unsigned char *)$esp@300.
2011-09-16 8:57 ` Eli Zaretskii
@ 2011-09-16 9:36 ` Hui Zhu
0 siblings, 0 replies; 4+ messages in thread
From: Hui Zhu @ 2011-09-16 9:36 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
Thanks Eli.
Checked in.
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.861&r2=1.862
Best,
Hui
On Fri, Sep 16, 2011 at 16:13, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Hui Zhu <teawater@gmail.com>
>> Date: Fri, 16 Sep 2011 15:54:54 +0800
>> Cc: Eli Zaretskii <eliz@gnu.org>
>>
>> 2011-09-16 Hui Zhu <teawater@gmail.com>
>>
>> * gdb.texinfo (Tracepoint Restrictions): Change *$esp@300
>> to *(unsigned char *)$esp@300.
>
> OK.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [doc/tracepoint] Change *$esp@300 to *(unsigned char *)$esp@300.
2011-09-16 8:13 [doc/tracepoint] Change *$esp@300 to *(unsigned char *)$esp@300 Hui Zhu
2011-09-16 8:57 ` Eli Zaretskii
@ 2011-09-16 10:45 ` Pedro Alves
1 sibling, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2011-09-16 10:45 UTC (permalink / raw)
To: gdb-patches; +Cc: Hui Zhu, Eli Zaretskii
On Friday 16 September 2011 08:54:54, Hui Zhu wrote:
> 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.
The manual actually says: "something like *$esp@300",
which indeed doesn't work nowadays:
(gdb) maint agent *$rsp@300
Attempt to dereference a generic pointer.
(it's not a bug, it was made to error on purpose)
In any case, the patch is a good change, thanks!
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-16 10:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-16 8:13 [doc/tracepoint] Change *$esp@300 to *(unsigned char *)$esp@300 Hui Zhu
2011-09-16 8:57 ` Eli Zaretskii
2011-09-16 9:36 ` Hui Zhu
2011-09-16 10:45 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox