(gdb) added section on list
This commit is contained in:
24
gdb.md
24
gdb.md
@@ -48,7 +48,7 @@ window.
|
|||||||
|
|
||||||
One can choose various layouts with the following command:
|
One can choose various layouts with the following command:
|
||||||
|
|
||||||
```
|
```gdb
|
||||||
# choose layout, enable views
|
# choose layout, enable views
|
||||||
layout <layout-name>
|
layout <layout-name>
|
||||||
# default layout options:
|
# default layout options:
|
||||||
@@ -61,7 +61,7 @@ layout <layout-name>
|
|||||||
The `tui` command also allows to define custom layouts.
|
The `tui` command also allows to define custom layouts.
|
||||||
See the example below.
|
See the example below.
|
||||||
|
|
||||||
```
|
```gdb
|
||||||
# defines a layout with the name `test` and the view `regs`, `src` and `cmd`
|
# defines a layout with the name `test` and the view `regs`, `src` and `cmd`
|
||||||
tui new-layout test {-horizontal regs 1 src 2} 1 cmd 1
|
tui new-layout test {-horizontal regs 1 src 2} 1 cmd 1
|
||||||
|
|
||||||
@@ -69,3 +69,23 @@ tui new-layout test {-horizontal regs 1 src 2} 1 cmd 1
|
|||||||
tui new-layout <name> <view> <weight> [<view> <weight>]
|
tui new-layout <name> <view> <weight> [<view> <weight>]
|
||||||
tui new-layout <name> {[-horizontal] <view> <weight> [<view> <weight>]} <weight>
|
tui new-layout <name> {[-horizontal] <view> <weight> [<view> <weight>]} <weight>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### source code view
|
||||||
|
|
||||||
|
The source code view - as the name suggests - displays source code.
|
||||||
|
By default the window displays the file containing the current instruction,
|
||||||
|
but one can choose a differnt file with the `list` command.
|
||||||
|
Below are several examples of how to use this command.
|
||||||
|
|
||||||
|
```gdb
|
||||||
|
# when specifying a file, a line number is required
|
||||||
|
list <file-name>:<line-number>
|
||||||
|
|
||||||
|
# list knows symbol names
|
||||||
|
list <symbol>
|
||||||
|
list main # this will show the main function
|
||||||
|
|
||||||
|
# show current execution point
|
||||||
|
list .
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user