github.com/sagernet/gvisor@v0.0.0-20240428053021-e691de28565f/pkg/abi/linux/linux_amd64_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  //go:build amd64 && amd64 && amd64 && amd64 && amd64 && amd64
     4  // +build amd64,amd64,amd64,amd64,amd64,amd64
     5  
     6  package linux
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/sagernet/gvisor/pkg/state"
    12  )
    13  
    14  func (p *PtraceRegs) StateTypeName() string {
    15  	return "pkg/abi/linux.PtraceRegs"
    16  }
    17  
    18  func (p *PtraceRegs) StateFields() []string {
    19  	return []string{
    20  		"R15",
    21  		"R14",
    22  		"R13",
    23  		"R12",
    24  		"Rbp",
    25  		"Rbx",
    26  		"R11",
    27  		"R10",
    28  		"R9",
    29  		"R8",
    30  		"Rax",
    31  		"Rcx",
    32  		"Rdx",
    33  		"Rsi",
    34  		"Rdi",
    35  		"Orig_rax",
    36  		"Rip",
    37  		"Cs",
    38  		"Eflags",
    39  		"Rsp",
    40  		"Ss",
    41  		"Fs_base",
    42  		"Gs_base",
    43  		"Ds",
    44  		"Es",
    45  		"Fs",
    46  		"Gs",
    47  	}
    48  }
    49  
    50  func (p *PtraceRegs) beforeSave() {}
    51  
    52  // +checklocksignore
    53  func (p *PtraceRegs) StateSave(stateSinkObject state.Sink) {
    54  	p.beforeSave()
    55  	stateSinkObject.Save(0, &p.R15)
    56  	stateSinkObject.Save(1, &p.R14)
    57  	stateSinkObject.Save(2, &p.R13)
    58  	stateSinkObject.Save(3, &p.R12)
    59  	stateSinkObject.Save(4, &p.Rbp)
    60  	stateSinkObject.Save(5, &p.Rbx)
    61  	stateSinkObject.Save(6, &p.R11)
    62  	stateSinkObject.Save(7, &p.R10)
    63  	stateSinkObject.Save(8, &p.R9)
    64  	stateSinkObject.Save(9, &p.R8)
    65  	stateSinkObject.Save(10, &p.Rax)
    66  	stateSinkObject.Save(11, &p.Rcx)
    67  	stateSinkObject.Save(12, &p.Rdx)
    68  	stateSinkObject.Save(13, &p.Rsi)
    69  	stateSinkObject.Save(14, &p.Rdi)
    70  	stateSinkObject.Save(15, &p.Orig_rax)
    71  	stateSinkObject.Save(16, &p.Rip)
    72  	stateSinkObject.Save(17, &p.Cs)
    73  	stateSinkObject.Save(18, &p.Eflags)
    74  	stateSinkObject.Save(19, &p.Rsp)
    75  	stateSinkObject.Save(20, &p.Ss)
    76  	stateSinkObject.Save(21, &p.Fs_base)
    77  	stateSinkObject.Save(22, &p.Gs_base)
    78  	stateSinkObject.Save(23, &p.Ds)
    79  	stateSinkObject.Save(24, &p.Es)
    80  	stateSinkObject.Save(25, &p.Fs)
    81  	stateSinkObject.Save(26, &p.Gs)
    82  }
    83  
    84  func (p *PtraceRegs) afterLoad(context.Context) {}
    85  
    86  // +checklocksignore
    87  func (p *PtraceRegs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    88  	stateSourceObject.Load(0, &p.R15)
    89  	stateSourceObject.Load(1, &p.R14)
    90  	stateSourceObject.Load(2, &p.R13)
    91  	stateSourceObject.Load(3, &p.R12)
    92  	stateSourceObject.Load(4, &p.Rbp)
    93  	stateSourceObject.Load(5, &p.Rbx)
    94  	stateSourceObject.Load(6, &p.R11)
    95  	stateSourceObject.Load(7, &p.R10)
    96  	stateSourceObject.Load(8, &p.R9)
    97  	stateSourceObject.Load(9, &p.R8)
    98  	stateSourceObject.Load(10, &p.Rax)
    99  	stateSourceObject.Load(11, &p.Rcx)
   100  	stateSourceObject.Load(12, &p.Rdx)
   101  	stateSourceObject.Load(13, &p.Rsi)
   102  	stateSourceObject.Load(14, &p.Rdi)
   103  	stateSourceObject.Load(15, &p.Orig_rax)
   104  	stateSourceObject.Load(16, &p.Rip)
   105  	stateSourceObject.Load(17, &p.Cs)
   106  	stateSourceObject.Load(18, &p.Eflags)
   107  	stateSourceObject.Load(19, &p.Rsp)
   108  	stateSourceObject.Load(20, &p.Ss)
   109  	stateSourceObject.Load(21, &p.Fs_base)
   110  	stateSourceObject.Load(22, &p.Gs_base)
   111  	stateSourceObject.Load(23, &p.Ds)
   112  	stateSourceObject.Load(24, &p.Es)
   113  	stateSourceObject.Load(25, &p.Fs)
   114  	stateSourceObject.Load(26, &p.Gs)
   115  }
   116  
   117  func init() {
   118  	state.Register((*PtraceRegs)(nil))
   119  }