Skip to content

Commit

Permalink
fixes + line wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
hoefler02 committed Jun 16, 2021
1 parent d0a01da commit 50ea000
Showing 1 changed file with 35 additions and 10 deletions.
45 changes: 35 additions & 10 deletions docs/commands/gef.md
Expand Up @@ -20,7 +20,8 @@ bytearray -- BytearrayCommand: Generate a bytearray to be compar

### GEF Missing Command

Displays the GEF commands which couldn't be loaded, along with the reason for the issue.
Displays the GEF commands which couldn't be loaded, along with the reason for
the issue.

```
gef➤ gef missing
Expand All @@ -31,13 +32,16 @@ gef➤ gef missing
```

As it says in the above output, the issues should be resolved by installing the missing package(s) using pip.
As it says in the above output, the issues should be resolved by installing the
missing package(s) using pip.

### GEF Config Command

Allows the user to set/view settings for the current debugging session. For making the changes persistent see the `gef save` entry.
Allows the user to set/view settings for the current debugging session. For
making the changes persistent see the `gef save` entry.

Using `gef config` by itself just shows all of the available settings and their values.
Using `gef config` by itself just shows all of the available settings and their
values.

```
gef➤ gef config
Expand All @@ -53,15 +57,31 @@ context.libc_args (bool) = False
```

You can use `gef config [setting] [value]` to set a setting for the current setting (see example below).
To filter the config settings you can use `gef config [setting]`.

```
gef➤ gef config theme.address_stack "blue"
gef➤ gef config theme
─────────────────────────── GEF configuration settings matching 'theme' ───────────────────────────
theme.context_title_line (str) = "gray"
theme.context_title_message (str) = "cyan"
theme.default_title_line (str) = "gray"
theme.default_title_message (str) = "cyan"
[...snip...]
```

You can use `gef config [setting] [value]` to set a setting for the current
session (see example below).

```
gef➤ gef config theme.address_stack blue
```

### GEF Save Command

The `gef save` command saves the current settings (set with `gef config`) to the user's `~/.gef.rc` file (making the changes persistent).
The `gef save` command saves the current settings (set with `gef config`) to
the user's `~/.gef.rc` file (making the changes persistent).

```
gef➤ gef save
Expand All @@ -70,7 +90,9 @@ gef➤ gef save

### GEF Restore Command

Using `gef restore` loads and applies settings from the `~/.gef.rc` file to the current session. This is useful if you are modifying your GEF configuration file and want to see the changes without completely reloading GEF.
Using `gef restore` loads and applies settings from the `~/.gef.rc` file to the
current session. This is useful if you are modifying your GEF configuration
file and want to see the changes without completely reloading GEF.

```
gef➤ gef restore
Expand All @@ -79,15 +101,18 @@ gef➤ gef restore

### GEF Set Command

The GEF set command allows the user to use GEF context within GDB set commands. This is useful when you want to make a convenient variable which can be set and referenced later.
The GEF set command allows the user to use GEF context within GDB set commands.
This is useful when you want to make a convenient variable which can be set and
referenced later.

```
gef➤ gef set $a=1
```

### GEF Run Command

The GEF run command is a wrapper around GDB's run command, allowing the user to use GEF context within the command.
The GEF run command is a wrapper around GDB's run command, allowing the user to
use GEF context within the command.

```
gef➤ gef run ./binary
Expand Down

0 comments on commit 50ea000

Please sign in to comment.