提交 3531f8fb 编写于 作者: A Anchor

Fix grammar and translations for GDB Debugging Profile of 11.2.md

上级 73d994c5
......@@ -40,7 +40,8 @@ Also used in its abbreviated form `l`, `list` is used to display the source code
Also used in its abbreviated form `b`, `break` is used to set breakpoints, and takes as an argument that defines which point to set the breakpoint at. For example, `b 10` sets a break point at the tenth row.
- delete
Also used in its abbreviated form `d`, `delete` is used to delete break points. the break point is set followed by the serial number, the serial number can be obtained through the `info breakpoints` break point set corresponding serial number is displayed as follows to set a break point number.
Also used in its abbreviated form `d`, `delete` is used to delete break points. The break point is set followed by the serial number. The serial number can be obtained through the `info breakpoints` command. Break points set with their corresponding serial numbers are displayed as follows to set a break point number.
Num Type Disp Enb Address What
2 breakpoint keep y 0x0000000000400dc3 in main.main at /home/xiemengjun/gdb.go:23
......@@ -48,7 +49,7 @@ Also used in its abbreviated form `d`, `delete` is used to delete break points.
- backtrace
Abbreviated command `bt`, the process used to print the execution of the code, as follows:
Abbreviated as `bt`, this command is used to print the execution of the code, for instance:
#0 main.main () at /home/xiemengjun/gdb.go:23
#1 0x000000000040d61e in runtime.main () at /home/xiemengjun/go/src/pkg/runtime/proc.c:244
......@@ -57,19 +58,19 @@ Abbreviated command `bt`, the process used to print the execution of the code, a
- info
info command to display information, followed by several parameters, we used the following categories:
The `info` command can be used in conjunction with several parameters to display information. The following parameters are commonly used:
- `info locals`
Displays the currently executing program variable values
Displays the currently executing program's variable values
- `info breakpoints`
Display a list of currently set breakpoints
Displays a list of currently set breakpoints
- `info goroutines`
Goroutine displays the current list of execution, as shown in the code, with* indicates the current execution
Displays the current list of running goroutines, as shown in the following code, with the `*` indicating the current execution
* 1 running runtime.gosched
* 2 syscall runtime.entersyscall
......@@ -78,24 +79,25 @@ Goroutine displays the current list of execution, as shown in the code, with* in
- print
Abbreviated command `p`, or other information used to print variable, followed by the variable name to be printed, of course, there are some very useful function $len() and $cap(), is used to return the current string, slices or maps the length and capacity.
Abbreviated as `p`, this command is used to print variables or other information. It takes as arguments the variable names to be printed and of course, there are some very useful functions such as $len() and $cap() that can be used to return the length or capacity of the current strings, slices or maps.
- whatis
Used to display the current variable type, followed by the variable name, for example, `whatis msg`, is shown below :
`whatis` is used to display the current variable type, followed by the variable name. For instance, `whatis msg`, will output the following:
type = struct string
- next
Abbreviated command `n`, for single-step debugging, skip the next step, when there is a break point, you can enter `n` jump to the next step to continue
Abbreviated as `n`, `next` is used in single-step debugging to skip to the next step. When there is a break point, you can enter `n` to jump to the next step to continue
- continue
Abbreviated command `c`, to jump out of the current break point can be followed by parameter N, the number of times the break point skipped
Abbreviated as `c`, `command` is used to jump out of the current break point and can be followed by a parameter N, which specifies the number of times to skip the break point
- set variable
This command is used to change the value of a variable during operation, formats such as : `set variable <var> = <value>`
This command is used to change the value of a variable in the process. It can be used like so: `set variable <var> = <value>`
## Debugging process
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册