Skip to content

Add debugger testing support#776

Merged
ben-clayton merged 7 commits intogoogle:masterfrom
ben-clayton:dbg
Jan 31, 2020
Merged

Add debugger testing support#776
ben-clayton merged 7 commits intogoogle:masterfrom
ben-clayton:dbg

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.

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