提交 7a414662 编写于 作者: D Derek Parker 提交者: Derek Parker

pkg/proc: Reorganize struct members

上级 2f746e1d
......@@ -27,9 +27,21 @@ import (
// BinaryInfo holds information on the binary being executed.
type BinaryInfo struct {
// Architecture of this binary.
Arch Arch
// GOOS operating system this binary is executing on.
GOOS string
// Functions is a list of all DW_TAG_subprogram entries in debug_info, sorted by entry point
Functions []Function
// Sources is a list of all source files found in debug_line.
Sources []string
// LookupFunc maps function names to a description of the function.
LookupFunc map[string]*Function
lastModified time.Time // Time the executable of this process was last modified
GOOS string
closer io.Closer
sepDebugCloser io.Closer
......@@ -38,23 +50,16 @@ type BinaryInfo struct {
// Maps package names to package paths, needed to lookup types inside DWARF info
packageMap map[string]string
Arch Arch
dwarf *dwarf.Data
frameEntries frame.FrameDescriptionEntries
loclist loclistReader
compileUnits []*compileUnit
types map[string]dwarf.Offset
packageVars []packageVar // packageVars is a list of all global/package variables in debug_info, sorted by address
gStructOffset uint64
dwarf *dwarf.Data
dwarfReader *dwarf.Reader
frameEntries frame.FrameDescriptionEntries
loclist loclistReader
compileUnits []*compileUnit
types map[string]dwarf.Offset
packageVars []packageVar // packageVars is a list of all global/package variables in debug_info, sorted by address
typeCache map[dwarf.Offset]godwarf.Type
// Functions is a list of all DW_TAG_subprogram entries in debug_info, sorted by entry point
Functions []Function
// Sources is a list of all source files found in debug_line.
Sources []string
// LookupFunc maps function names to a description of the function.
LookupFunc map[string]*Function
typeCache map[dwarf.Offset]godwarf.Type
gStructOffset uint64
loadModuleDataOnce sync.Once
moduleData []moduleData
......@@ -71,8 +76,6 @@ type BinaryInfo struct {
loadErrMu sync.Mutex
loadErr error
dwarfReader *dwarf.Reader
}
// ErrUnsupportedLinuxArch is returned when attempting to debug a binary compiled for an unsupported architecture.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册