golang-debugger-book

所属分类:collect
开发工具:Makefile
文件大小:0KB
下载次数:0
上传日期:2023-03-08 18:29:33
上 传 者sh-1993
说明:  从调试器的角度,让我们探索计算机世界!编译器、链接器和调试器如何围绕用特定编程语言编写的程序相互协调调试器是如何工作的如果我们为go编程语言开发调试器,我们必须掌握go类型系统、运行时。。。和一些操作系统内部组件。好的,...
(From a debugger s view, Let s explore the computer world! How does compiler, linker and debugger coordinate with each other around the program written in specific programming language? How does a debugger work? If we develop a debugger for go programming language, we must master go type system, runtime... and some Operating System internals. OK,...)

文件列表:
Makefile (2177, 2023-08-12)
book.en/ (0, 2023-08-12)
book.en/10-thanks/ (0, 2023-08-12)
book.en/11-appendix/ (0, 2023-08-12)
book.en/11-appendix/1-go-programme-start.md (0, 2023-08-12)
book.en/2-preface/ (0, 2023-08-12)
book.en/3-terms/ (0, 2023-08-12)
book.en/4-basics/ (0, 2023-08-12)
book.en/4-basics/1-purposes.md (1520, 2023-08-12)
book.en/4-basics/2-dependencies.md (14206, 2023-08-12)
book.en/4-basics/3-countertactics.md (4680, 2023-08-12)
book.en/4-basics/assets/ (0, 2023-08-12)
book.en/4-basics/assets/clip_image001.png (14618, 2023-08-12)
book.en/4-basics/assets/clip_image002-3995693.png (25114, 2023-08-12)
book.en/4-basics/assets/clip_image002.png (53194, 2023-08-12)
book.en/4-basics/assets/clip_image003-3995693.png (11219, 2023-08-12)
book.en/4-basics/assets/clip_image003.png (14953, 2023-08-12)
book.en/4-basics/assets/clip_image004-3995693.png (11535, 2023-08-12)
book.en/4-basics/assets/clip_image004.png (18138, 2023-08-12)
book.en/4-basics/assets/clip_image005-3995693.png (6220, 2023-08-12)
book.en/4-basics/assets/clip_image005.png (8511, 2023-08-12)
book.en/4-basics/assets/clip_image006.png (28682, 2023-08-12)
book.en/5-dwarf/ (0, 2023-08-12)
book.en/5-dwarf/1-history.md (3996, 2023-08-12)
book.en/5-dwarf/2-structure.md (1092, 2023-08-12)
book.en/5-dwarf/3-die-desc-code.md (4528, 2023-08-12)
book.en/5-dwarf/3-die-desc-datatype.md (15321, 2023-08-12)
book.en/5-dwarf/3-die-encoding.md (1266, 2023-08-12)
book.en/5-dwarf/3-die-intro.md (4497, 2023-08-12)
book.en/5-dwarf/4-other-accelerated-access.md (2796, 2023-08-12)
book.en/5-dwarf/4-other-callframe-info.md (27113, 2023-08-12)
... ...

# How to develop a (golang) debugger You can read this book (Chinese version) here: https://www.hitzhangjie.pro/debugger101.io/ . ## 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](https://github.com/hitzhangjie/golang-debugger-book/blob/master/github.com/go-delve/delve) and the author [derek parker](https://github.com/hitzhangjie/golang-debugger-book/blob/master/https://twitter.com/derkthedaring?lang=en) 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. ## Samples The project "**golang-debugger-book**" also provides a repository "**golang-debugger-lessons**" which contains sample code. Readers can view the sample code according to the chapter correspondence. The directory "**0-godbg**" provides a relatively complete implementation of a symbol-level debugger for go language. Of course, there have been some debuggers for the Go language, such as gdb, dlv, etc. To develop a debugger from scratch is not just to develop a new debugger, but to use the debugger as an entry point, that could help us integrate relevant knowledge. The technical points here involve the go language itself (type system, goroutine scheduling), the cooperation between the compiler and the debugger (DWARF), the operating system kernel (virtual memory, task scheduling, system calls, instructions patching) and processor-related instructions, etc. In short, I hope to start with the development of a go language debugger as an entry point to help beginners quickly get started with go language development, and gradually understand the mechanisms behind operating system, compiler, debugger, and processor, so we could deepen the overall understanding of the computer system. I hope that this book and related samples can be smoothly completed. It can be regarded as a way for me to hone my temperament and improve myself. It would be great if it can really help everyone. ## Read the Book locally 1. run git to clone the repository ```bash git clone https://github.com/hitzhangjie/golang-debugger-book ``` 2. run gitbook to serve the book If you have installed gitbook-cli by npm or homebrew, you could run the following command to serve the book: ```bash # read the chinese version cd book.zh gitbook install && gitbook serve # read the english version cd book.en gitbook install && gitbook serve ``` Though gitbook-cli is deprecated offically, it is still a very popular EBook generator. If trying to install gitbook-cli today, we may encounter some errors, because the nodejs, graceful-fs has broken some compatibility with gitbook-cli. Because of this, I have built a docker image `hitzhangjie/gitbook-cli:latest`, you could pull and use this docker image instead of installing by npm or homebrew package manager. ```bash # read the english version rm book.en/_book docker run --name gitbook --rm -v ${PWD}/book.en:/root/gitbook hitzhangjie/gitbook-cli:latest gitbook install . docker run --name gitbook --rm -v ${PWD}/book.en:/root/gitbook -p 4000:4000 -p 35729:35729 hitzhangjie/gitbook-cli:latest gitbook serve . # read the chinese version rm book.zh/_book docker run --name gitbook --rm -v ${PWD}/book.zh:/root/gitbook hitzhangjie/gitbook-cli:latest gitbook install . docker run --name gitbook --rm -v ${PWD}/book.zh:/root/gitbook -p 4000:4000 -p 35729:35729 hitzhangjie/gitbook-cli:latest gitbook serve . ``` We put the commands into Makefile, you can just run `make chinese` or `make english` to read the relevant version. ## Contact Please email me **hit.zhangjie@gmail.com**, I will respond as soon as possible. Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.

近期下载者

相关文件


收藏者