[docs] Adjust the example command line in DebuggingCoroutines.rst
authorChuanqi Xu <chuaniq.xcq@alibaba-inc.com>
Mon, 22 Aug 2022 14:15:24 +0000 (22:15 +0800)
committerChuanqi Xu <chuaniq.xcq@alibaba-inc.com>
Mon, 22 Aug 2022 14:15:47 +0000 (22:15 +0800)
The original commandline example was not correct in some environments.
Adjust the example to avoid any misunderstanding.

clang/docs/DebuggingCoroutines.rst

index e6942a4..828822f 100644 (file)
@@ -147,8 +147,10 @@ printing the details of the coroutine frame from an address is also possible:
   (gdb) # Get the linkage name for the coroutine
   (gdb) x 0x4019e0
   0x4019e0 <_ZL9coro_taski>:  0xe5894855
+  (gdb) # Turn off the demangler temporarily to avoid the debugger misunderstanding the name.
+  (gdb) set demangle-style none
   (gdb) # The coroutine frame type is 'linkage_name.coro_frame_ty'
-  (gdb) print  (_ZL9coro_taski.coro_frame_ty)*(0x418eb0)
+  (gdb) print  ('_ZL9coro_taski.coro_frame_ty')*(0x418eb0)
   $2 = {__resume_fn = 0x4019e0 <coro_task(int)>, __destroy_fn = 0x402000 <coro_task(int)>, __promise = {...}, ...}
 
 The above is possible because: