Comments (3)
After thinking about that: if my reasoning is correct, then it means we should keep a sorted Vec of (PdbInternalSectionOffset, DebugSubsection) (sorted on offset) and then make a binary search to get the correct DS.
It should fix in the mean time the complexity of lines_at_offset (which is currently linear) which should become log (I'd have prefer constant but doesn't seem possible).
from pdb.
We can probably merge this with the fix for #61. The fix would be pretty much what you proposed, except I would propose a BTreeMap<Offset, DS>
.
However, in PDBs there is always a separate subsection per function. So if you search for the function's start offset, you should always have an exact hit. What is the offset that you're feeding into lines_at_offset
? This obviously includes the function epilogue, which might account for the difference of 0x10
.
from pdb.
I used lines_at_offset with proc_symbol.offset (ie: {s: 0x1, o: 0x8990}).
I printed DebugLinesSubsections for this line_program (this is the only one):
DebugLinesSubsection { header: DebugLinesHeader { offset: PdbInternalSectionOffset { section: 0x1, offset: 0x8980 }, flags: 0, code_size: 49 }, data: [0, 0, 0, 0, 9, 0, 0, 0, 84, 0, 0, 0, 16, 0, 0, 0, 45, 0, 0, 128, 16, 0, 0, 0, 47, 0, 0, 128, 23, 0, 0, 0, 48, 0, 0, 128, 26, 0, 0, 0, 49, 0, 0, 128, 30, 0, 0, 0, 50, 0, 0, 128, 35, 0, 0, 0, 51, 0, 0, 128, 38, 0, 0, 0, 52, 0, 0, 128, 40, 0, 0, 0, 62, 0, 0, 128, 44, 0, 0, 0, 66, 0, 0, 128] }
So it seems that it's "almost always" or maybe I'm doing something wrong.
from pdb.
Related Issues (20)
- Question regarding `FieldAttributes::is_intro_virtual` HOT 2
- Integer truncation following `parse_unsigned` in src/tpi/data.rs HOT 3
- Expose LineProgram line subsections HOT 2
- Expose symbol kind constants such as S_PUB32 HOT 3
- ImageSectionHeader virtual_size is wrongly named physical_address HOT 1
- Add support for FastLink symbols (S_REF_MINIPDB2 / S_FASTLINK)
- Add support for Trampoline symbols (S_TRAMPOLINE)
- Section offsets are 1-indexed HOT 4
- C++ 20's char8_t isn't supported
- Document the correct way to look up LineInfo(s) given only RVA HOT 3
- Add support for Alias (typedef) Types
- Unsupported type
- PdbInternalSectionOffset should derive Ord
- Take advantage of the type index offset data HOT 3
- Expose the type stream hash table in some way
- Stream type is not exposed, public method named_stream returns private type
- Support for .NET PDBs HOT 2
- Add support for LF_TAGGED_UNION, LF_TUCASE
- Add support for small MSF file format HOT 5
- NGEN-generated PDB support HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdb.