Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

dwarfRegisterBytes

Public Function
std.debug.cpu_context.M68k.dwarfRegisterBytes
pub fn dwarfRegisterBytes(ctx: *M68k, register_num: u16) DwarfRegisterError![]u8

Params

  • ctx: *M68k
  • register_num: u16

Errors

InvalidRegister
UnsupportedRegister

File

debug/cpu_context.zig:911
911
912
913
914
915
916
917
918
919
920
921
922
    pub fn dwarfRegisterBytes(ctx: *M68k, register_num: u16) DwarfRegisterError![]u8 {
        switch (register_num) {
            0...7 => return @ptrCast(&ctx.d[register_num]),
            8...15 => return @ptrCast(&ctx.a[register_num - 8]),
            26 => return @ptrCast(&ctx.pc),

            16...23 => return error.UnsupportedRegister, // fp0 - fp7
            24...25 => return error.UnsupportedRegister, // Return columns in GCC...?

            else => return error.InvalidRegister,
        }
    }