gitlab.com/Raven-IO/raven-delve@v1.22.4/pkg/proc/core/minidump/fileflags_string.go (about)

     1  // Code generated by "stringer -type FileFlags,StreamType,Arch,MemoryState,MemoryType,MemoryProtection"; DO NOT EDIT.
     2  
     3  package minidump
     4  
     5  import "strconv"
     6  
     7  const _FileFlags_name = "FileNormalFileWithDataSegsFileWithFullMemoryFileWithHandleDataFileFilterMemoryFileScanMemoryFileWithUnloadedModulesFileWithIncorrectlyReferencedMemoryFileFilterModulePathsFileWithProcessThreadDataFileWithPrivateReadWriteMemoryFileWithoutOptionalDataFileWithFullMemoryInfoFileWithThreadInfoFileWithCodeSegsFileWithoutAuxilliarySegsFileWithFullAuxilliaryStateFileWithPrivateCopyMemoryFileIgnoreInaccessibleMemoryFileWithTokenInformation"
     8  
     9  var _FileFlags_map = map[FileFlags]string{
    10  	0:      _FileFlags_name[0:10],
    11  	1:      _FileFlags_name[10:26],
    12  	2:      _FileFlags_name[26:44],
    13  	4:      _FileFlags_name[44:62],
    14  	8:      _FileFlags_name[62:78],
    15  	16:     _FileFlags_name[78:92],
    16  	32:     _FileFlags_name[92:115],
    17  	64:     _FileFlags_name[115:150],
    18  	128:    _FileFlags_name[150:171],
    19  	256:    _FileFlags_name[171:196],
    20  	512:    _FileFlags_name[196:226],
    21  	1024:   _FileFlags_name[226:249],
    22  	2048:   _FileFlags_name[249:271],
    23  	4096:   _FileFlags_name[271:289],
    24  	8192:   _FileFlags_name[289:305],
    25  	16384:  _FileFlags_name[305:330],
    26  	32768:  _FileFlags_name[330:357],
    27  	65536:  _FileFlags_name[357:382],
    28  	131072: _FileFlags_name[382:410],
    29  	262144: _FileFlags_name[410:434],
    30  }
    31  
    32  func (i FileFlags) String() string {
    33  	if str, ok := _FileFlags_map[i]; ok {
    34  		return str
    35  	}
    36  	return "FileFlags(" + strconv.FormatInt(int64(i), 10) + ")"
    37  }
    38  
    39  const _StreamType_name = "UnusedStreamReservedStream0ReservedStream1ThreadListStreamModuleListStreamMemoryListStreamExceptionStreamSystemInfoStreamThreadExListStreamMemory64ListStreamCommentStreamACommentStreamWHandleDataStreamFunctionTableStreamUnloadedModuleStreamMiscInfoStreamMemoryInfoListStreamThreadInfoListStreamHandleOperationListStreamTokenStreamJavascriptDataStreamSystemMemoryInfoStreamProcessVMCounterStream"
    40  
    41  var _StreamType_index = [...]uint16{0, 12, 27, 42, 58, 74, 90, 105, 121, 139, 157, 171, 185, 201, 220, 240, 254, 274, 294, 319, 330, 350, 372, 394}
    42  
    43  func (i StreamType) String() string {
    44  	if i >= StreamType(len(_StreamType_index)-1) {
    45  		return "StreamType(" + strconv.FormatInt(int64(i), 10) + ")"
    46  	}
    47  	return _StreamType_name[_StreamType_index[i]:_StreamType_index[i+1]]
    48  }
    49  
    50  const (
    51  	_Arch_name_0 = "CpuArchitectureX86CpuArchitectureMipsCpuArchitectureAlphaCpuArchitecturePPCCpuArchitectureSHXCpuArchitectureARMCpuArchitectureIA64CpuArchitectureAlpha64CpuArchitectureMSILCpuArchitectureAMD64CpuArchitectureWoW64"
    52  	_Arch_name_1 = "CpuArchitectureARM64"
    53  	_Arch_name_2 = "CpuArchitectureUnknown"
    54  )
    55  
    56  var (
    57  	_Arch_index_0 = [...]uint8{0, 18, 37, 57, 75, 93, 111, 130, 152, 171, 191, 211}
    58  )
    59  
    60  func (i Arch) String() string {
    61  	switch {
    62  	case i <= 10:
    63  		return _Arch_name_0[_Arch_index_0[i]:_Arch_index_0[i+1]]
    64  	case i == 12:
    65  		return _Arch_name_1
    66  	case i == 65535:
    67  		return _Arch_name_2
    68  	default:
    69  		return "Arch(" + strconv.FormatInt(int64(i), 10) + ")"
    70  	}
    71  }
    72  
    73  const (
    74  	_MemoryState_name_0 = "MemoryStateCommit"
    75  	_MemoryState_name_1 = "MemoryStateReserve"
    76  	_MemoryState_name_2 = "MemoryStateFree"
    77  )
    78  
    79  func (i MemoryState) String() string {
    80  	switch {
    81  	case i == 4096:
    82  		return _MemoryState_name_0
    83  	case i == 8192:
    84  		return _MemoryState_name_1
    85  	case i == 65536:
    86  		return _MemoryState_name_2
    87  	default:
    88  		return "MemoryState(" + strconv.FormatInt(int64(i), 10) + ")"
    89  	}
    90  }
    91  
    92  const (
    93  	_MemoryType_name_0 = "MemoryTypePrivate"
    94  	_MemoryType_name_1 = "MemoryTypeMapped"
    95  	_MemoryType_name_2 = "MemoryTypeImage"
    96  )
    97  
    98  func (i MemoryType) String() string {
    99  	switch {
   100  	case i == 131072:
   101  		return _MemoryType_name_0
   102  	case i == 262144:
   103  		return _MemoryType_name_1
   104  	case i == 16777216:
   105  		return _MemoryType_name_2
   106  	default:
   107  		return "MemoryType(" + strconv.FormatInt(int64(i), 10) + ")"
   108  	}
   109  }
   110  
   111  const (
   112  	_MemoryProtection_name_0 = "MemoryProtectNoAccessMemoryProtectReadOnly"
   113  	_MemoryProtection_name_1 = "MemoryProtectReadWrite"
   114  	_MemoryProtection_name_2 = "MemoryProtectWriteCopy"
   115  	_MemoryProtection_name_3 = "MemoryProtectExecute"
   116  	_MemoryProtection_name_4 = "MemoryProtectExecuteRead"
   117  	_MemoryProtection_name_5 = "MemoryProtectExecuteReadWrite"
   118  	_MemoryProtection_name_6 = "MemoryProtectExecuteWriteCopy"
   119  	_MemoryProtection_name_7 = "MemoryProtectPageGuard"
   120  	_MemoryProtection_name_8 = "MemoryProtectNoCache"
   121  	_MemoryProtection_name_9 = "MemoryProtectWriteCombine"
   122  )
   123  
   124  var (
   125  	_MemoryProtection_index_0 = [...]uint8{0, 21, 42}
   126  )
   127  
   128  func (i MemoryProtection) String() string {
   129  	switch {
   130  	case 1 <= i && i <= 2:
   131  		i -= 1
   132  		return _MemoryProtection_name_0[_MemoryProtection_index_0[i]:_MemoryProtection_index_0[i+1]]
   133  	case i == 4:
   134  		return _MemoryProtection_name_1
   135  	case i == 8:
   136  		return _MemoryProtection_name_2
   137  	case i == 16:
   138  		return _MemoryProtection_name_3
   139  	case i == 32:
   140  		return _MemoryProtection_name_4
   141  	case i == 64:
   142  		return _MemoryProtection_name_5
   143  	case i == 128:
   144  		return _MemoryProtection_name_6
   145  	case i == 256:
   146  		return _MemoryProtection_name_7
   147  	case i == 512:
   148  		return _MemoryProtection_name_8
   149  	case i == 1024:
   150  		return _MemoryProtection_name_9
   151  	default:
   152  		return "MemoryProtection(" + strconv.FormatInt(int64(i), 10) + ")"
   153  	}
   154  }