mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std: make std.dwarf.FixedBufferReader public
Also fixes a compile-error as the field `is_64` no longer exists.
This commit is contained in:
parent
778ab767b1
commit
0103c4bf78
@ -2437,7 +2437,7 @@ pub const EntryHeader = struct {
|
|||||||
|
|
||||||
/// The length of the entry including the ID field, but not the length field itself
|
/// The length of the entry including the ID field, but not the length field itself
|
||||||
pub fn entryLength(self: EntryHeader) usize {
|
pub fn entryLength(self: EntryHeader) usize {
|
||||||
return self.entry_bytes.len + @as(u8, if (self.is_64) 8 else 4);
|
return self.entry_bytes.len + @as(u8, if (self.format == .@"64") 8 else 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Reads a header for either an FDE or a CIE, then advances the fbr to the position after the trailing structure.
|
/// Reads a header for either an FDE or a CIE, then advances the fbr to the position after the trailing structure.
|
||||||
@ -2735,7 +2735,7 @@ fn pcRelBase(field_ptr: usize, pc_rel_offset: i64) !usize {
|
|||||||
|
|
||||||
// Reading debug info needs to be fast, even when compiled in debug mode,
|
// Reading debug info needs to be fast, even when compiled in debug mode,
|
||||||
// so avoid using a `std.io.FixedBufferStream` which is too slow.
|
// so avoid using a `std.io.FixedBufferStream` which is too slow.
|
||||||
const FixedBufferReader = struct {
|
pub const FixedBufferReader = struct {
|
||||||
buf: []const u8,
|
buf: []const u8,
|
||||||
pos: usize = 0,
|
pos: usize = 0,
|
||||||
endian: std.builtin.Endian,
|
endian: std.builtin.Endian,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user