golang-debugger

command module
v0.0.0-...-6d4ef26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

README

Please see hitzhangjie/golang-debugger-book, hitzhangjie/golang-debugger-lesson instead.

This repo is archieved.

How to develop a (golang) debugger

Introduction

This project aims to introduce how to develop a (golang) debugger, including Operating System's support, how to coordinate work between compiler, linker and debugger, debugging information standard, mapping between machine instruction and source code, etc.

Thanks to delve and the author derek parker and other contributors. I learned a lot from them. I want to share the knowledge to develop a (golang) debugger. I hope this project can be useful for developers interested in debugging topic.

To develop a symbolic debugger need to combine the knowledge of CPU instruction (like instruction patching), Operating System (like linux ptrace and OS scheduler), compilers, linkers, loaders, debuggers (how to coordinate the work between them), executable file format (how to store debugging information), debugging information format (how to describe source code, how to map between instruction and source, vice versa), and features of different programming languages (like goroutine concept), so I think it's also a good chance to improve the understanding of computer technology.

I think it's very helpful, So I am really excited to write this documents.

Read the Book

  1. clone the repository
git clone https://github.com/hitzhangjie/golang-debugger
  1. install gitbook or gitbook-cli
# macOS
brew install gitbook-cli

# linux
yum install gitbook-cli
apt install gitbook-cli

# windows
...
  1. build the book
cd golang-debugger/doc

# initialize gitbook plugins
make init 

# build English version
make english

# build Chinese version
make chinese

  1. clean tmpfiles
make clean

Contact

Please email me hit.zhangjie@gmail.com, I will respond as soon as possible.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package command implements functions for responding to user input and dispatching to appropriate backend commands.
Package command implements functions for responding to user input and dispatching to appropriate backend commands.
dwarf
frame
Package frame contains data structures and related functions for parsing and searching through Dwarf .debug_frame data.
Package frame contains data structures and related functions for parsing and searching through Dwarf .debug_frame data.
op
Package proctl provides functions for attaching to and manipulating a process during the debug session.
Package proctl provides functions for attaching to and manipulating a process during the debug session.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL