Advertisement
hakonhagland

macos-lldb-debug-ncurses-printw

Mar 2nd, 2022
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. $ lldb tcw
  2. (lldb) target create "tcw"
  3. Current executable set to '/Users/hakonhaegland/Library/Mobile Documents/com~apple~CloudDocs/c/ncursesw/tcw' (arm64).
  4. (lldb) break set -n printw
  5. Breakpoint 1: where = libncursesw.6.dylib`printw + 20 at lib_printw.c:59:5, address = 0x000000000001699c
  6. (lldb) run
  7. Process 96949 launched: '/Users/hakonhaegland/Library/Mobile Documents/com~apple~CloudDocs/c/ncursesw/tcw' (arm64)
  8. Process 96949 stopped
  9. * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  10. frame #0: 0x000000010025e99c libncursesw.6.dylib`printw(fmt="Hello, привет!") at lib_printw.c:59:5
  11. 56 va_end(argq);
  12. 57 #endif
  13. 58
  14. -> 59 va_start(argp, fmt);
  15. 60 code = vw_printw(stdscr, fmt, argp);
  16. 61 va_end(argp);
  17. 62
  18. Target 0: (tcw) stopped.
  19. (lldb) p fmt
  20. (const char *) $0 = 0x0000000100003fa1 "Hello, привет!"
  21. (lldb) q
  22. Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] Y
  23. $
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement