Comments (3)
@philipc: What if we made BigEndian
and LittleEndian
into zero sized structs with no members and then made DynamicEndian
an enum between the two?
#[derive(all the things)]
pub struct CompileTimeEndian<B: byteorder::ByteOrder>(PhantomData<B>);
impl<B: byteorder::ByteOrder> byteorder::ByteOrder for CompileTimeEndian<B> {
// ...
}
pub type BigEndian = CompileTimeEndian<byteorder::BigEndian>;
pub type LittleEndian = CompileTimeEndian<byteorder::LittleEndian>;
pub enum RunTimeEndian {
Big(BigEndian),
Little(LittleEndian),
}
impl byteorder::ByteOrder for RunTimeEndian {
// ...
}
from gimli.
I think this means we will need all the various read_u64
methods to take &self
, so we can't just use ByteOrder
instead of Endianity
as #155 proposes.
from gimli.
What if we made BigEndian and LittleEndian into zero sized structs with no members and then made DynamicEndian an enum between the two?
Yes, that is what I was thinking, and agree that it means we still need Endianity
.
from gimli.
Related Issues (20)
- Failing to parse Firefox libxul.so .debug_aranges due to unexpected version 3 in aranges header HOT 5
- Please update "object" dependency to latest version HOT 2
- It should be possible to skip units with unknown versions HOT 5
- Allow remapping all of line program when rewriting HOT 5
- Incorrect Location from DW_Op evaluator when value left on stack HOT 2
- Are there any plans to add c binding ? HOT 3
- Use `gimli` without `alloc` HOT 16
- Extra validation in dwarf-validate
- AttributeSpecification::size may be wrong for DW_FORM_ref_addr in version 2 if word size and address size differ HOT 4
- Segmentation fault in `ArrayVec::clear` HOT 10
- support for features required by dwp HOT 8
- Allow `DW_AT_decl_file` = 0 for DWARF 5 HOT 1
- Support for setting CIE augmentation strings HOT 3
- Feature request: Ability to iterate over all entries in the EhHdrTable HOT 4
- EhHdrTable::lookup doesn't return the address that corresponds to the found FDE HOT 4
- Consider switching from memmap crate dependency
- Addr2line broken with clang 15? HOT 1
- DW_AT_ranges how to get origin value? HOT 13
- Add a way to share parsed `Abbreviations` between `Unit`s HOT 8
- Invalid ranges read from wasm file HOT 2
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 gimli.