[Doc]tracepoint: change *$esp@300 to *(unsigned char *)$esp@300

Hui Zhu
2010-08-24T02:10:51Z

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 <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
@@ -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