Source File
const.go
Belonging Package
debug/dwarf
// Copyright 2009 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.// Constantspackage dwarf//go:generate stringer -type Attr -trimprefix=Attr// An Attr identifies the attribute type in a DWARF [Entry.Field].type Attr uint32const (AttrSibling Attr = 0x01AttrLocation Attr = 0x02AttrName Attr = 0x03AttrOrdering Attr = 0x09AttrByteSize Attr = 0x0BAttrBitOffset Attr = 0x0CAttrBitSize Attr = 0x0DAttrStmtList Attr = 0x10AttrLowpc Attr = 0x11AttrHighpc Attr = 0x12AttrLanguage Attr = 0x13AttrDiscr Attr = 0x15AttrDiscrValue Attr = 0x16AttrVisibility Attr = 0x17AttrImport Attr = 0x18AttrStringLength Attr = 0x19AttrCommonRef Attr = 0x1AAttrCompDir Attr = 0x1BAttrConstValue Attr = 0x1CAttrContainingType Attr = 0x1DAttrDefaultValue Attr = 0x1EAttrInline Attr = 0x20AttrIsOptional Attr = 0x21AttrLowerBound Attr = 0x22AttrProducer Attr = 0x25AttrPrototyped Attr = 0x27AttrReturnAddr Attr = 0x2AAttrStartScope Attr = 0x2CAttrStrideSize Attr = 0x2EAttrUpperBound Attr = 0x2FAttrAbstractOrigin Attr = 0x31AttrAccessibility Attr = 0x32AttrAddrClass Attr = 0x33AttrArtificial Attr = 0x34AttrBaseTypes Attr = 0x35AttrCalling Attr = 0x36AttrCount Attr = 0x37AttrDataMemberLoc Attr = 0x38AttrDeclColumn Attr = 0x39AttrDeclFile Attr = 0x3AAttrDeclLine Attr = 0x3BAttrDeclaration Attr = 0x3CAttrDiscrList Attr = 0x3DAttrEncoding Attr = 0x3EAttrExternal Attr = 0x3FAttrFrameBase Attr = 0x40AttrFriend Attr = 0x41AttrIdentifierCase Attr = 0x42AttrMacroInfo Attr = 0x43AttrNamelistItem Attr = 0x44AttrPriority Attr = 0x45AttrSegment Attr = 0x46AttrSpecification Attr = 0x47AttrStaticLink Attr = 0x48AttrType Attr = 0x49AttrUseLocation Attr = 0x4AAttrVarParam Attr = 0x4BAttrVirtuality Attr = 0x4CAttrVtableElemLoc Attr = 0x4D// The following are new in DWARF 3.AttrAllocated Attr = 0x4EAttrAssociated Attr = 0x4FAttrDataLocation Attr = 0x50AttrStride Attr = 0x51AttrEntrypc Attr = 0x52AttrUseUTF8 Attr = 0x53AttrExtension Attr = 0x54AttrRanges Attr = 0x55AttrTrampoline Attr = 0x56AttrCallColumn Attr = 0x57AttrCallFile Attr = 0x58AttrCallLine Attr = 0x59AttrDescription Attr = 0x5AAttrBinaryScale Attr = 0x5BAttrDecimalScale Attr = 0x5CAttrSmall Attr = 0x5DAttrDecimalSign Attr = 0x5EAttrDigitCount Attr = 0x5FAttrPictureString Attr = 0x60AttrMutable Attr = 0x61AttrThreadsScaled Attr = 0x62AttrExplicit Attr = 0x63AttrObjectPointer Attr = 0x64AttrEndianity Attr = 0x65AttrElemental Attr = 0x66AttrPure Attr = 0x67AttrRecursive Attr = 0x68// The following are new in DWARF 4.AttrSignature Attr = 0x69AttrMainSubprogram Attr = 0x6AAttrDataBitOffset Attr = 0x6BAttrConstExpr Attr = 0x6CAttrEnumClass Attr = 0x6DAttrLinkageName Attr = 0x6E// The following are new in DWARF 5.AttrStringLengthBitSize Attr = 0x6FAttrStringLengthByteSize Attr = 0x70AttrRank Attr = 0x71AttrStrOffsetsBase Attr = 0x72AttrAddrBase Attr = 0x73AttrRnglistsBase Attr = 0x74AttrDwoName Attr = 0x76AttrReference Attr = 0x77AttrRvalueReference Attr = 0x78AttrMacros Attr = 0x79AttrCallAllCalls Attr = 0x7AAttrCallAllSourceCalls Attr = 0x7BAttrCallAllTailCalls Attr = 0x7CAttrCallReturnPC Attr = 0x7DAttrCallValue Attr = 0x7EAttrCallOrigin Attr = 0x7FAttrCallParameter Attr = 0x80AttrCallPC Attr = 0x81AttrCallTailCall Attr = 0x82AttrCallTarget Attr = 0x83AttrCallTargetClobbered Attr = 0x84AttrCallDataLocation Attr = 0x85AttrCallDataValue Attr = 0x86AttrNoreturn Attr = 0x87AttrAlignment Attr = 0x88AttrExportSymbols Attr = 0x89AttrDeleted Attr = 0x8AAttrDefaulted Attr = 0x8BAttrLoclistsBase Attr = 0x8C)func ( Attr) () string {if , := _Attr_map[]; {return "dwarf.Attr" +}return "dwarf." + .String()}// A format is a DWARF data encoding format.type format uint32const (// value formatsformAddr format = 0x01formDwarfBlock2 format = 0x03formDwarfBlock4 format = 0x04formData2 format = 0x05formData4 format = 0x06formData8 format = 0x07formString format = 0x08formDwarfBlock format = 0x09formDwarfBlock1 format = 0x0AformData1 format = 0x0BformFlag format = 0x0CformSdata format = 0x0DformStrp format = 0x0EformUdata format = 0x0FformRefAddr format = 0x10formRef1 format = 0x11formRef2 format = 0x12formRef4 format = 0x13formRef8 format = 0x14formRefUdata format = 0x15formIndirect format = 0x16// The following are new in DWARF 4.formSecOffset format = 0x17formExprloc format = 0x18formFlagPresent format = 0x19formRefSig8 format = 0x20// The following are new in DWARF 5.formStrx format = 0x1AformAddrx format = 0x1BformRefSup4 format = 0x1CformStrpSup format = 0x1DformData16 format = 0x1EformLineStrp format = 0x1FformImplicitConst format = 0x21formLoclistx format = 0x22formRnglistx format = 0x23formRefSup8 format = 0x24formStrx1 format = 0x25formStrx2 format = 0x26formStrx3 format = 0x27formStrx4 format = 0x28formAddrx1 format = 0x29formAddrx2 format = 0x2AformAddrx3 format = 0x2BformAddrx4 format = 0x2C// Extensions for multi-file compression (.dwz)// http://www.dwarfstd.org/ShowIssue.php?issue=120604.1formGnuRefAlt format = 0x1f20formGnuStrpAlt format = 0x1f21)//go:generate stringer -type Tag -trimprefix=Tag// A Tag is the classification (the type) of an [Entry].type Tag uint32const (TagArrayType Tag = 0x01TagClassType Tag = 0x02TagEntryPoint Tag = 0x03TagEnumerationType Tag = 0x04TagFormalParameter Tag = 0x05TagImportedDeclaration Tag = 0x08TagLabel Tag = 0x0ATagLexDwarfBlock Tag = 0x0BTagMember Tag = 0x0DTagPointerType Tag = 0x0FTagReferenceType Tag = 0x10TagCompileUnit Tag = 0x11TagStringType Tag = 0x12TagStructType Tag = 0x13TagSubroutineType Tag = 0x15TagTypedef Tag = 0x16TagUnionType Tag = 0x17TagUnspecifiedParameters Tag = 0x18TagVariant Tag = 0x19TagCommonDwarfBlock Tag = 0x1ATagCommonInclusion Tag = 0x1BTagInheritance Tag = 0x1CTagInlinedSubroutine Tag = 0x1DTagModule Tag = 0x1ETagPtrToMemberType Tag = 0x1FTagSetType Tag = 0x20TagSubrangeType Tag = 0x21TagWithStmt Tag = 0x22TagAccessDeclaration Tag = 0x23TagBaseType Tag = 0x24TagCatchDwarfBlock Tag = 0x25TagConstType Tag = 0x26TagConstant Tag = 0x27TagEnumerator Tag = 0x28TagFileType Tag = 0x29TagFriend Tag = 0x2ATagNamelist Tag = 0x2BTagNamelistItem Tag = 0x2CTagPackedType Tag = 0x2DTagSubprogram Tag = 0x2ETagTemplateTypeParameter Tag = 0x2FTagTemplateValueParameter Tag = 0x30TagThrownType Tag = 0x31TagTryDwarfBlock Tag = 0x32TagVariantPart Tag = 0x33TagVariable Tag = 0x34TagVolatileType Tag = 0x35// The following are new in DWARF 3.TagDwarfProcedure Tag = 0x36TagRestrictType Tag = 0x37TagInterfaceType Tag = 0x38TagNamespace Tag = 0x39TagImportedModule Tag = 0x3ATagUnspecifiedType Tag = 0x3BTagPartialUnit Tag = 0x3CTagImportedUnit Tag = 0x3DTagMutableType Tag = 0x3E // Later removed from DWARF.TagCondition Tag = 0x3FTagSharedType Tag = 0x40// The following are new in DWARF 4.TagTypeUnit Tag = 0x41TagRvalueReferenceType Tag = 0x42TagTemplateAlias Tag = 0x43// The following are new in DWARF 5.TagCoarrayType Tag = 0x44TagGenericSubrange Tag = 0x45TagDynamicType Tag = 0x46TagAtomicType Tag = 0x47TagCallSite Tag = 0x48TagCallSiteParameter Tag = 0x49TagSkeletonUnit Tag = 0x4ATagImmutableType Tag = 0x4B)func ( Tag) () string {if <= TagTemplateAlias {return "dwarf.Tag" + .String()}return "dwarf." + .String()}// Location expression operators.// The debug info encodes value locations like 8(R3)// as a sequence of these op codes.// This package does not implement full expressions;// the opPlusUconst operator is expected by the type parser.const (opAddr = 0x03 /* 1 op, const addr */opDeref = 0x06opConst1u = 0x08 /* 1 op, 1 byte const */opConst1s = 0x09 /* " signed */opConst2u = 0x0A /* 1 op, 2 byte const */opConst2s = 0x0B /* " signed */opConst4u = 0x0C /* 1 op, 4 byte const */opConst4s = 0x0D /* " signed */opConst8u = 0x0E /* 1 op, 8 byte const */opConst8s = 0x0F /* " signed */opConstu = 0x10 /* 1 op, LEB128 const */opConsts = 0x11 /* " signed */opDup = 0x12opDrop = 0x13opOver = 0x14opPick = 0x15 /* 1 op, 1 byte stack index */opSwap = 0x16opRot = 0x17opXderef = 0x18opAbs = 0x19opAnd = 0x1AopDiv = 0x1BopMinus = 0x1CopMod = 0x1DopMul = 0x1EopNeg = 0x1FopNot = 0x20opOr = 0x21opPlus = 0x22opPlusUconst = 0x23 /* 1 op, ULEB128 addend */opShl = 0x24opShr = 0x25opShra = 0x26opXor = 0x27opSkip = 0x2F /* 1 op, signed 2-byte constant */opBra = 0x28 /* 1 op, signed 2-byte constant */opEq = 0x29opGe = 0x2AopGt = 0x2BopLe = 0x2CopLt = 0x2DopNe = 0x2EopLit0 = 0x30/* OpLitN = OpLit0 + N for N = 0..31 */opReg0 = 0x50/* OpRegN = OpReg0 + N for N = 0..31 */opBreg0 = 0x70 /* 1 op, signed LEB128 constant *//* OpBregN = OpBreg0 + N for N = 0..31 */opRegx = 0x90 /* 1 op, ULEB128 register */opFbreg = 0x91 /* 1 op, SLEB128 offset */opBregx = 0x92 /* 2 op, ULEB128 reg; SLEB128 off */opPiece = 0x93 /* 1 op, ULEB128 size of piece */opDerefSize = 0x94 /* 1-byte size of data retrieved */opXderefSize = 0x95 /* 1-byte size of data retrieved */opNop = 0x96// The following are new in DWARF 3.opPushObjAddr = 0x97opCall2 = 0x98 /* 2-byte offset of DIE */opCall4 = 0x99 /* 4-byte offset of DIE */opCallRef = 0x9A /* 4- or 8- byte offset of DIE */opFormTLSAddress = 0x9BopCallFrameCFA = 0x9CopBitPiece = 0x9D// The following are new in DWARF 4.opImplicitValue = 0x9EopStackValue = 0x9F// The following a new in DWARF 5.opImplicitPointer = 0xA0opAddrx = 0xA1opConstx = 0xA2opEntryValue = 0xA3opConstType = 0xA4opRegvalType = 0xA5opDerefType = 0xA6opXderefType = 0xA7opConvert = 0xA8opReinterpret = 0xA9/* 0xE0-0xFF reserved for user-specific */)// Basic type encodings -- the value for AttrEncoding in a TagBaseType Entry.const (encAddress = 0x01encBoolean = 0x02encComplexFloat = 0x03encFloat = 0x04encSigned = 0x05encSignedChar = 0x06encUnsigned = 0x07encUnsignedChar = 0x08// The following are new in DWARF 3.encImaginaryFloat = 0x09encPackedDecimal = 0x0AencNumericString = 0x0BencEdited = 0x0CencSignedFixed = 0x0DencUnsignedFixed = 0x0EencDecimalFloat = 0x0F// The following are new in DWARF 4.encUTF = 0x10// The following are new in DWARF 5.encUCS = 0x11encASCII = 0x12)// Statement program standard opcode encodings.const (lnsCopy = 1lnsAdvancePC = 2lnsAdvanceLine = 3lnsSetFile = 4lnsSetColumn = 5lnsNegateStmt = 6lnsSetBasicBlock = 7lnsConstAddPC = 8lnsFixedAdvancePC = 9// DWARF 3lnsSetPrologueEnd = 10lnsSetEpilogueBegin = 11lnsSetISA = 12)// Statement program extended opcode encodings.const (lneEndSequence = 1lneSetAddress = 2lneDefineFile = 3// DWARF 4lneSetDiscriminator = 4)// Line table directory and file name entry formats.// These are new in DWARF 5.const (lnctPath = 0x01lnctDirectoryIndex = 0x02lnctTimestamp = 0x03lnctSize = 0x04lnctMD5 = 0x05)// Location list entry codes.// These are new in DWARF 5.const (lleEndOfList = 0x00lleBaseAddressx = 0x01lleStartxEndx = 0x02lleStartxLength = 0x03lleOffsetPair = 0x04lleDefaultLocation = 0x05lleBaseAddress = 0x06lleStartEnd = 0x07lleStartLength = 0x08)// Unit header unit type encodings.// These are new in DWARF 5.const (utCompile = 0x01utType = 0x02utPartial = 0x03utSkeleton = 0x04utSplitCompile = 0x05utSplitType = 0x06)// Opcodes for DWARFv5 debug_rnglists section.const (rleEndOfList = 0x0rleBaseAddressx = 0x1rleStartxEndx = 0x2rleStartxLength = 0x3rleOffsetPair = 0x4rleBaseAddress = 0x5rleStartEnd = 0x6rleStartLength = 0x7)
![]() |
The pages are generated with Golds v0.7.9-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |