This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6923f9
commit 332dfd9
Showing
18 changed files
with
1,645 additions
and
39 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "srcview" | ||
version = "0.1.0" | ||
edition = "2018" | ||
license = "MIT" | ||
|
||
[features] | ||
# Feature to gate tests that depend on binary artifacts, should be removed when | ||
# #1143 is resolved. | ||
binary-tests = [] | ||
|
||
[dependencies] | ||
log = "0.4" | ||
nom = "6" | ||
pdb = "0.7" | ||
regex = "1" | ||
serde = { version = "1", features = ["derive"] } | ||
xml-rs = "0.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# srcview | ||
|
||
A library for mapping module+offset to source:line. Note that you'll get | ||
significantly better results if you use instruction level coverage as | ||
opposed to branch. Alternatively you're welcome to post-process branch | ||
coverage into instruction, but this project does not assist with that. | ||
|
||
## Docs | ||
|
||
`cargo doc --open` | ||
|
||
## Usage | ||
|
||
See [`examples/dump_cobertura.rs`](examples/dump_cobertura.rs). | ||
|
||
This can be run with `cargo run --example dump_cobertura res\example.pdb res\example.txt`. | ||
|
||
The biggest challenge when making this work is likely getting the absolute PDB | ||
paths to match relative paths inside your repo. To make this a bit easier, you | ||
can dump the PDB paths with: `cargo run --example dump_paths res\example.pdb` | ||
|
||
## ADO Integration | ||
|
||
See [`azure-pipelines.yml`](azure-pipelines.yml). | ||
|
||
## VSCode Integration | ||
|
||
Install [Coverage Gutters](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters), | ||
then place a file named `coverage.xml` at a location such that the relative | ||
file paths match your repo. Note that this is a file you should generate | ||
yourself, and that the `coverage.xml` included in this repo will probably not | ||
help you. From there, navigate to any file you expect to see coverage in. If | ||
the paths and coverage file correctly line up, you should see red or green bars | ||
next to the source lines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# TODO | ||
- add trace/info/warn | ||
- flesh out modoff parser error | ||
- consider using Cow to reduce memory usage | ||
- consider mixed case module names? | ||
- redo xml generation to not be hand-rolled |
Oops, something went wrong.