-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support interactive gdb for running individual tests #2815
Comments
Thanks for reporting and I'm glad you found a solution. I see the need for a feature like this, and one way to implement it might be to add a similar wrapping to to bazel's standard skylark library. |
What we'll do is to make it so that if you do This will also obviate the need for the |
/cc @laszlocsomor -- I'm not planning to implement this for Windows and replace it instead with an |
Acknowledged, thanks for letting me know! |
Note to self: make it possible to convey the current directory of the client somehow because that's what one would intuitively expect. This requirement is at odds with using |
So, one comment on the |
Well, you are 50% right :) I agree that it's not a full fidelity execution and that was one of the disadvantages of the approach I'm taking, but it gets us there much earlier than the 100% solution and it has the advantage of finally fixing a few decada e-old (!) bugs in However, the difference is not the command line arguments. Those will be handled correctly. It's that if I navigated through our layers of abstraction well, you won't get a sandbox with |
… direct child of the process where the Blaze client itself was run. Limitations: - Untested on Windows; it should work because ExecuteProgram() is implemented there, too, but since Windows doesn't support exec(), there is at least one process in between Progress towards #2815. RELNOTES[NEW]: The new "--direct_run" flag on "blaze run" lets one run interactive binaries. PiperOrigin-RevId: 184528845
Today,
--run_under=gdb
doesn't allow interactivity, as there is no stdin. It's possible to make a remote GDB flow with--run_under=gdbserver
work, but it's a pain and requires wrapping to make presentable to developers who are familiar with agdb <my test binary>
kind of flow.I managed to make this work for the Envoy project in envoyproxy/envoy#749, but this is a bit of a hack - I get
--run_under
to point to a script that scrapes out the environment and then generates another script to invokes the test binary and gdb with.There should probably be a cleaner way to do this directly from Bazel.
CC envoyproxy/envoy#415
The text was updated successfully, but these errors were encountered: