Categorygithub.com/debugger101/godbg
modulepackage
0.0.0-20201210093613-164ae1a95c11
Repository: https://github.com/debugger101/godbg.git
Documentation: pkg.go.dev

# README

godbg

Start a new project, the debugger on linux platform for go

开个新坑,go语言在linux下的调试器

export GO111MODULE=on  
go build -o godbg main.go 
./godbg debug ./test_file/t1.go

or you can `make install` and use `godbg` globally   

display
display.gif

This project is inspired by dlv

Reference:

Writing a Linux Debugger

elf101-64.pdf

ELF_Format.pdf

# Packages

No description provided by the author
No description provided by the author

# Functions

https://en.wikipedia.org/wiki/LEB128 result = 0; shift = 0; size = number of bits in signed integer; do{ byte = next byte in input; result |= (low order 7 bits of byte << shift); shift += 7; } while (high order bit of byte != 0); /* sign bit of byte is second high order bit (0x40) */ if ((shift <size) && (sign bit of byte is set)) /* sign extend */ result |= (~0 << shift);.
https://en.wikipedia.org/wiki/LEB128 result = 0; shift = 0; while(true) { byte = next byte in input; result |= (low order 7 bits of byte) << shift; if (high order bit of byte == 0) break; shift += 7; }.

# Constants

+delta.
1-byte delta.
2-byte delta.
4-byte delta.
ULEB128 register, ULEB128 offset.
BLOCK.
ULEB128 offset.
SLEB128 offset.
ULEB128 register.
ULEB128 register, SLEB128 offset.
ULEB128 register, BLOCK.
https://golang.org/pkg/cmd/internal/dwarf/.
https://golang.org/pkg/cmd/internal/dwarf/.
operand,...
+register (ULEB128 offset).
ULEB128 register, ULEB128 offset.
ULEB128 register, SLEB128 offset.
ULEB128 register, ULEB128 register.
https://golang.org/pkg/cmd/internal/dwarf/.
+register.
ULEB128 register.
https://golang.org/pkg/cmd/internal/dwarf/.
ULEB128 register.
address.
ULEB128 register.
ULEB128, BLOCK.
ULEB128, ULEB128.
ULEB128, SLEB128.
0.
1 constant address (size target specific).
0.
2.
1 signed 2-byte constant.
1 ...
1 SLEB128 offset base register 0..31 = (DW_OP_breg0 + regnum).
2 ULEB128 register followed by SLEB128 offset.
0.
1 4- or 8-byte offset of DIE.
1 2-byte offset of DIE.
1 4-byte offset of DIE.
1 1-byte constant.
1 1-byte constant.
1 2-byte constant.
1 2-byte constant.
1 4-byte constant.
1 4-byte constant.
1 8-byte constant.
1 8-byte constant.
1 SLEB128 constant.
1 ULEB128 constant.
0.
1 1-byte size of data retrieved.
0.
0.
0.
0.
1 SLEB128 offset.
0.
0.
0.
This table is produced by go compiler and linker.
0.
0 ...
0 literals 0..31 = (DW_OP_lit0 + literal).
This table is produced by go compiler and linker.
0.
0.
0.
0.
0.
0.
0.
0.
0.
0.
1 1-byte stack index.
1 ULEB128 size of piece addressed.
0.
1 ULEB128 addend.
0.
0 ..
0 reg 0..31 = (DW_OP_reg0 + regnum).
1 ULEB128 register.
0.
0.
0.
0.
1 signed 2-byte constant.
0.
0.
1 1-byte size of data retrieved.
0.
No description provided by the author
No description provided by the author
Value is rule.Reg + rule.Offset.
No description provided by the author
Value is stored at address rule.Reg + rule.Offset, but only if it's less than the current CFA, otherwise same value.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
http://dwarfstd.org/doc/Dwarf3.pdf.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
Rules defined for register values.