Skip to content
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

Add debugger testing support #776

Merged
merged 7 commits into from
Jan 31, 2020
Merged

Add debugger testing support #776

merged 7 commits into from
Jan 31, 2020

Conversation

ben-clayton
Copy link
Contributor

An overview of the functionality and design can be found in the docs/debugger.md file, which is part of this change.

Note that this is all rather WIP, but this PR gives us something that we can start playing with.

@ben-clayton
Copy link
Contributor Author

Looking into presubmit failures now.

docs/debugger.md Outdated Show resolved Hide resolved
docs/debugger.md Outdated Show resolved Hide resolved
docs/debugger.md Outdated Show resolved Hide resolved
docs/debugger.md Outdated Show resolved Hide resolved
docs/debugger.md Outdated Show resolved Hide resolved
src/vulkan/engine_vulkan_debugger.cc Show resolved Hide resolved
src/vulkan/engine_vulkan_debugger.cc Show resolved Hide resolved
src/vulkan/engine_vulkan_debugger.cc Outdated Show resolved Hide resolved
src/vulkan/engine_vulkan_debugger.cc Outdated Show resolved Hide resolved
src/vulkan/engine_vulkan_debugger.cc Outdated Show resolved Hide resolved
Copy link
Contributor Author

@ben-clayton ben-clayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the extremely thorougher review. I've tried to address everything you commented on.

@dj2
Copy link
Collaborator

dj2 commented Jan 30, 2020

This is pretty much lgtm once the bots are fixed. If you could add the comments about step_in, etc to the markdown file and the bug for the parsing bit. The only thing I see is the leak of the debugger if Connect fails.

@ben-clayton ben-clayton force-pushed the dbg branch 2 times, most recently from 059776d to 7788698 Compare January 30, 2020 14:27
This namespace holds the types used to describe the tests to perform on a shader debugger.
`debug.cc` implements the `amber::debug::Script` class, which is a simple record-and-replay implementation of the debugger interfaces. This is used to hold the parsed debugger instructions, and can be replayed onto the real debugger when the commands are executed.

The parser for generating the debug scripts along with the debugger itself come in later changes.
The parsed `amber::debug::Script` is assigned to the `amber::Command`, but is currently unused.
Add the new third_party dependencies:
• github.com/google/cppdap
• github.com/nlohmann/json (required by cppdap)

Add the `AMBER_ENABLE_VK_DEBUGGING` option to CMake. This builds and links `cppdap`, but is not currrently referenced in code.

Rolled SwiftShader forward, and passed required CMake debugger build flags down.
@ben-clayton
Copy link
Contributor Author

(Did another push to try to fix the kokoro flakes)

@ben-clayton ben-clayton force-pushed the dbg branch 2 times, most recently from cd04a3a to d68ad72 Compare January 30, 2020 17:25
This is an initial, rough version, but implements enough to perform single line stepping, and verifying location and local values.

See docs/debugger.md for details.
One for SPIR-V debugging, one for HLSL debugging using `OpenCL.DebugInfo.100`.
Remove the need for callbacks, which unnecessarily compilated the parsing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants