DavidSpickett wrote:

> We can't remove the program file while lldb has it open.

```
        path_to_exe = self.getBuildArtifact()

        (target, process, thread, bkpt) = lldbutil.run_to_name_breakpoint(self, 
"main")

        # Let the process continue to exit:
        process.Continue()
        self.assertEqual(process.GetState(), lldb.eStateExited, "Ran to 
completion")
        os.remove(path_to_exe)
```

The interactive equivalent is:
```
target file
b main
run
continue
(program exits)
```
You cannot delete the file here because something is still holding onto it. If 
you exit LLDB completely, then you can delete the file.

Over zealous code in the Windows process plugin? Probably, but I wasn't about 
to go digging for it.

https://github.com/llvm/llvm-project/pull/145994
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to