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 support for inlinee lines #47

Merged
merged 32 commits into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fb0434b
Added preliminary support for S_INLINESITE
mitsuhiko Jul 19, 2019
0ace7a6
Added S_INLINESITE2 support
mitsuhiko Jul 19, 2019
9b641c8
Changed error
mitsuhiko Jul 19, 2019
6700db9
Added basic support for inlinee lines
mitsuhiko Jul 20, 2019
865a723
Refactor symbols
jan-auer Jul 31, 2019
7c7b1f2
Added extra opcode for invalid vs eof
mitsuhiko Jul 31, 2019
3767b59
Allow random access to symbols in a symbol table
jan-auer Jul 31, 2019
6885e39
Implement S_BUILDINFO
jan-auer Jul 31, 2019
24aca5e
Evaluate binary annotations
mitsuhiko Aug 1, 2019
bef9ed7
Add missing doc comments
jan-auer Aug 1, 2019
8da50e2
Fix doc comments of SymbolIndex
jan-auer Aug 2, 2019
8eb8c93
Fix symbols tests and lints
jan-auer Aug 2, 2019
91c5a67
Expose the index of symbols
jan-auer Aug 2, 2019
b0edcb7
Expose a higher-level inlinee line iterator
jan-auer Aug 21, 2019
d15680d
Fix annotation parsing of optional values
jan-auer Aug 21, 2019
e6264f6
Fix default line info kinds and add more tests
jan-auer Aug 23, 2019
996a451
Add more doc comments
jan-auer Aug 23, 2019
a69921f
Fix comments for dbg_{start,end}_offset
jan-auer Aug 26, 2019
256b173
fix: Add more tests and fix more bugs in annotations
jan-auer Aug 28, 2019
b896dd9
Implement AssignAdd for section offset types
jan-auer Aug 28, 2019
d3ae0dd
Streamline impls and formatting of index types
jan-auer Aug 30, 2019
02d8c0d
Add tests and fix a bug in seeking
jan-auer Aug 30, 2019
f870746
Make TypeIndex a newtype
jan-auer Aug 30, 2019
6d50bba
Make SymbolIndex externally optional
jan-auer Aug 30, 2019
2d8448a
Remove an obsolete comment on SymbolIndex
jan-auer Aug 30, 2019
d43490b
Fix formatting
jan-auer Aug 30, 2019
ca70b59
Provide more direct access to inlinees
jan-auer Sep 2, 2019
aaddc45
Add missing debug impl for Inlinees
jan-auer Sep 3, 2019
8d50fd4
Merge branch 'master' into feature/inlinees
jan-auer Sep 3, 2019
9049936
Move inlinees to ModuleInfo
jan-auer Sep 3, 2019
84c2d43
Remove invalid annotation operator and add comments
jan-auer Sep 4, 2019
48cf06d
Make Register a newtype
jan-auer Sep 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/pdb2hpp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@ impl<'p> Class<'p> {
// TODO: attributes (static, virtual, etc.)
self.fields.push(Field {
type_name: type_name(type_finder, data.field_type, needed_types)?,
name: data.name.clone(),
name: data.name,
offset: data.offset,
});
}

pdb::TypeData::Method(ref data) => {
let method = Method::find(
data.name.clone(),
data.name,
data.attributes,
type_finder,
data.method_type,
Expand All @@ -195,7 +195,7 @@ impl<'p> Class<'p> {
{
// hooray
let method = Method::find(
data.name.clone(),
data.name,
attributes,
type_finder,
method_type,
Expand Down Expand Up @@ -425,7 +425,7 @@ impl<'p> Enum<'p> {
// ignore everything else even though that's sad
if let pdb::TypeData::Enumerate(ref data) = field {
self.values.push(EnumValue {
name: data.name.clone(),
name: data.name,
value: data.value,
});
}
Expand Down
2 changes: 1 addition & 1 deletion examples/pdb_lines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn dump_pdb(filename: &str) -> pdb::Result<()> {
while let Some(symbol) = symbols.next()? {
if let Ok(SymbolData::Procedure(proc)) = symbol.parse() {
let sign = if proc.global { "+" } else { "-" };
println!("{} {}", sign, symbol.name()?.to_string());
println!("{} {}", sign, proc.name);

let mut lines = program.lines_at_offset(proc.offset);
while let Some(line_info) = lines.next()? {
Expand Down
15 changes: 6 additions & 9 deletions examples/pdb_symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@ fn print_usage(program: &str, opts: Options) {
fn print_row(offset: PdbInternalSectionOffset, kind: &str, name: pdb::RawString<'_>) {
println!(
"{:x}\t{:x}\t{}\t{}",
offset.section,
offset.offset,
kind,
name.to_string()
offset.section, offset.offset, kind, name
);
}

fn print_symbol(symbol: &pdb::Symbol<'_>) -> pdb::Result<()> {
match symbol.parse()? {
pdb::SymbolData::PublicSymbol(data) => {
print_row(data.offset, "function", symbol.name()?);
pdb::SymbolData::Public(data) => {
print_row(data.offset, "function", data.name);
}
pdb::SymbolData::DataSymbol(data) => {
print_row(data.offset, "data", symbol.name()?);
pdb::SymbolData::Data(data) => {
print_row(data.offset, "data", data.name);
}
pdb::SymbolData::Procedure(data) => {
print_row(data.offset, "function", symbol.name()?);
print_row(data.offset, "function", data.name);
}
_ => {
// ignore everything else
Expand Down
Loading