[Lldb-commits] [PATCH] D59177: [lldb] [test] Make 2lwp_process_SIGSEGV test more portable

Kamil Rytarowski via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Mar 9 11:28:40 PST 2019


krytarowski added inline comments.


================
Comment at: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c:9
   char F = 'b';
-  kill(getpid(), SIGSEGV); // Frame bar
+  while (1); // Frame bar
 }
----------------
Just style, but I would use `while (1) continue;`


================
Comment at: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c:31
   _lwp_create(&uc, 0, &lid);
+  sleep(1);
+  kill(getpid(), SIGSEGV);
----------------
It's a style but I would replace `sleep(1)` with a global volatile int that is switched in `bar` and here we could wait with: `while (!initialized) continue;`


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59177/new/

https://reviews.llvm.org/D59177





More information about the lldb-commits mailing list