[Lldb-commits] [lldb] [lldb] Require paused process and frame for "register info" command (PR #67124)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 22 07:36:02 PDT 2023
================
@@ -659,3 +659,16 @@ def test_fs_gs_base(self):
pthread_self_val.GetValueAsUnsigned(0),
"fs_base does not equal to pthread_self() value.",
)
+
+ def test_process_must_be_stopped(self):
+ """Check that all register commands error when the process is not stopped."""
+ self.build()
+ exe = self.getBuildArtifact("a.out")
+ pid = self.spawnSubprocess(exe, ["wait_for_attach"]).pid
+ self.setAsync(True)
+ self.runCmd("process attach --continue -p %d" % pid)
----------------
DavidSpickett wrote:
Judging by tests like https://github.com/llvm/llvm-project/blob/45e425e355a2f962bd4eb728b5f081d51900a8f9/lldb/test/API/functionalities/thread/state/TestThreadStates.py#L108, it is expected.
Interactively you'd `process attach` then wait for it to hit a signal or you'd then ctrl-c to stop it. So I need to set the async mode before doing anything that would create the process object.
https://github.com/llvm/llvm-project/pull/67124
More information about the lldb-commits
mailing list