Due to a logic error, lldb-server ended up asserting/crashing every time
the debugged process attempted an execve(). This fixes the error, and
extends TestExec to work on other platforms too. The "extension"
consists of avoiding non-standard posix_spawn extensions and using the
classic execve() call, which should be available on any platform that
actually supports re-execing. I change the test decorator from
@skipUnlessDarwin to @skipIfWindows.
Details
Details
- Reviewers
clayborg jasonmolenda - Commits
- rG8f23294be789: Merging r366985: --------------------------------------------------------------…
rL367128: Merging r366985:
rGee74c9e5fdd8: LLGS: fix tracking execve on linux
rLLDB366985: LLGS: fix tracking execve on linux
rL366985: LLGS: fix tracking execve on linux
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Is this not going to be racy on other platforms? Or do all platforms stop at entry point once a program has been exec'ed? I am worried we might miss the breakpoint.
Comment Actions
LGTM. I don't think the use of the posix_spawn API are important for the test case to exercise. If posix_spawn had a problem on darwin systems, lldb/debugserver's process launching would turn it up pretty quick.
Comment Actions
stopping on exec is a pretty standard feature of all ptrace-ish implementations, so I think all platforms should be able to implement that. Whether they actually implement it is a different question, and I wouldn't be surprised if this test ends up failing on some BSDs for example.