You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,15 @@
1
1
# gdbgui release history
2
2
3
3
## development
4
+
**Breaking Changes**
5
+
* Removed `cmd` positional argument from CLI. Use `--args` instead.
6
+
* Replaced `--gdb` flag with `--gdb-cmd`. The `--gdb-cmd` argument specifies the gdb executable as well as all arguments you wish to pass to gdb at startup, for example `--gdb-cmd "gdb -nx"`.
7
+
* Removed `--rr` flag. Use `--gdb-cmd rr replay` instead.
8
+
9
+
**Additional Changes**
10
+
* Replaced single terminal on frontend with three terminals: an interactive xterm terminal running gdb, a gdbgui console for diagnostic messages, and a terminal connected to the inferior application being debugged.
11
+
* Updates to the dashboard
12
+
* Add ability to specify gdb command from the browser. This can now be accomplished from the dashboard.
4
13
* Removed gdbgui binaries from source control. They can now be downloaded as artifacts of [releases](https://github.com/cs01/gdbgui/releases).
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-56
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@ Thanks for your interest in contributing to gdbgui!
2
2
3
3
If your change is small, go ahead and submit a pull request. If it is substantial, create a GitHub issue to discuss it before making the change.
4
4
5
-
## Development Instructions
5
+
## Dependencies
6
6
7
-
gdbgui uses [nox](https://github.com/theacodes/nox) to automate various tasks. You will need it installed on your system before continuing.
7
+
1.) [nox](https://github.com/theacodes/nox) is used to automate various tasks. You will need it installed on your system before continuing.
8
8
9
9
You can install it with pipx (recommended):
10
10
```
@@ -15,72 +15,33 @@ or pip:
15
15
> pip install --user nox
16
16
```
17
17
18
-
### Step 1: Compile JavaScript Code
18
+
2.) [yarn](https://yarnpkg.com/) is used for managing JavaScript files
19
19
20
-
gdbgui compiles JavaScript source code into a single .js file.
21
-
22
-
Note that `yarn` can be replaced with `npm`:
23
-
24
-
First install JavaScript dependencies:
25
-
```bash
26
-
yarn install
20
+
## Developing
21
+
Development can be done with one simple step:
27
22
```
28
-
29
-
To watch JavaScript files for changes and build non-optimized code for each change, use
30
-
```
31
-
yarn start
23
+
> nox -s develop
32
24
```
25
+
This will install all Python and JavaScript dependencies, and build and watch Python and JavaScript files for changes, automatically reloading as things are changed.
33
26
34
-
This is useful for iterating on changes.
35
-
36
-
To build once for production-optimized code, you can run
37
-
```
38
-
yarn build
39
-
```
40
-
41
-
### Step 2: Run Server
27
+
Make sure you [turn your cache off](https://www.technipages.com/google-chrome-how-to-completely-disable-cache) so that changes made locally are reflected in the page.
42
28
29
+
## Running and Adding tests
43
30
```bash
44
-
git clone https://github.com/cs01/gdbgui
45
-
cd gdbgui
46
-
nox -s develop-3.7 # replace with desired Python version
47
-
source .nox/develop-3-7/bin/activate # replace with desired Python version
31
+
> nox
48
32
```
49
33
50
-
You are now in a virtual environment with gdbgui's dependencies installed. When finished, type `deactivate` to leave the virtual environment.
34
+
runs all applicable tests and linting.
51
35
52
-
```bash
53
-
python -m gdbgui --debug
36
+
Python tests are in `gdbgui/tests`. They are run as part of the above command, but can be run with
54
37
```
55
-
56
-
The `--debug` flag:
57
-
58
-
1. Automatically reloads the server when it detects changes you've made
59
-
1. Adds a new component at the bottom of the right sidebar called "gdb machine interface output" that displays the raw gdb mi output to help you debug.
60
-
1. Displays all changes to state data in the browser's developer console, such as `rendered_source_file_fullname null -> /home/chad/git/gdbgui/examples/hello.c`
61
-
62
-
63
-
### Step 3: Make your changes
64
-
65
-
Open the browser to view gdbgui. Refresh the page as you make changes to JavaScript code.
66
-
67
-
!!! Note
68
-
69
-
Make sure you have caching turned off in your browser. In Chrome, for example, this is a setting in the developer console.
70
-
71
-
### Step 4: Run and Add tests
72
-
73
-
To continue, you must have nox installed.
74
-
75
-
```bash
76
-
nox
38
+
> nox -s python_tests
77
39
```
78
40
79
-
runs gdbgui unit tests.
80
-
81
-
If you have changed any Python code, add new tests to `gdbgui/tests/test_app.py` as necessary.
82
-
83
-
JavaScript tests are minimal, so you will have to manually excercise any code paths that may be affected.
41
+
JavaScript tests are in `gdbgui/src/js/tests`. They are run as part of the above command, but can be run with
Use Mozilla's [record and replay](https://rr-project.org) (rr) debugging supplement to gdb. rr lets your record a program (usually with a hard-to-reproduce bug in it), then deterministically replay it as many times as you want. You can even step forwards and backwards.
65
61
```
66
-
gdbgui --rr
62
+
gdbgui --gdb-cmd "rr replay"
67
63
```
68
64
69
65
Use recording other than the most recent one
70
66
71
67
```
72
-
gdbgui --rr RECORDED_DIRECTORY
68
+
gdbgui --gdb-cmd "rr replay RECORDED_DIRECTORY"
73
69
```
74
70
75
71
Don't automatically open the browser when launching
Copy file name to clipboardExpand all lines: docs/gettingstarted.md
+6-9
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,13 @@
1
-
Now that you have `gdbgui` installed, all you need to do is run
1
+
Before running `gdbgui`, you should compile your program with debug symbols and a lower level of optimization, so code isn't optimized out before runtime. To include debug symbols with `gcc` or `rustc`, this means using `-g`. To disable most optimizations in gdcc `gcc` use the `-O0` flag.
2
+
3
+
For more details, consult your compiler's documentation or a search engine.
4
+
5
+
Now that you have `gdbgui` installed and your program compiled with debug symbols, all you need to do is run
2
6
```
3
7
gdbgui
4
8
```
5
9
6
-
which will start gdbgui's server and open a new tab in your browser. That tab contains a fully functional frontend running `gdb`!
10
+
This will start gdbgui's server and open a new tab in your browser. That tab contains a fully functional frontend running `gdb`!
7
11
8
12
You can see gdbgui in action on [YouTube](https://www.youtube.com/channel/UCUCOSclB97r9nd54NpXMV5A).
9
13
@@ -32,10 +36,3 @@ The following keyboard shortcuts are available when the focus is not in an input
32
36
* Up: u or up arrow
33
37
* Next Instruction: m
34
38
* Step Instruction: ,
35
-
36
-
37
-
## Debugging Faults
38
-
39
-
If your program exits unexpectedly from something like a SEGFAULT, gdbgui displays a button in the console to re-enter the state the program was in when it exited. This allows you to inspect the stack, the line on which the program exited, memory, variables, registers, etc.
Copy file name to clipboardExpand all lines: docs/guides.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,9 @@ Remember, these guides, like gdbgui, are **open source** and can be edited by yo
7
7
After downloading gdbgui, you can launch it like so:
8
8
9
9
*`gdbgui` (or whatever the binary name is, i.e. `gdbgui_0.10.0.0`)
10
-
*`gdbgui "./mybinary -myarg value -flag1 -flag2"` (note the quotes around the arguments)
11
-
*`gdbgui --args "./mybinary -myarg value -flag1 -flag2"` (note the quotes around the arguments)
10
+
*`gdbgui --args ./mybinary -myarg value -flag1 -flag2`
11
+
12
+
Make sure the program you want to debug was compiled with debug symbols. See the getting started section for more details.
12
13
13
14
A new tab in your browser will open with gdbgui in it. If a browser tab did not open, navigate to the ip/port that gdbgui is being served on (i.e. http://localhost:5000).
If using an Intel CPU and running Linux, gdbgui also works in conjunction with [rr](http://rr-project.org/) to let you debug in reverse.
14
+
If the environment supports reverse debugging, such as when using an Intel CPU and running Linux and debugging with [rr](http://rr-project.org/), gdbgui allows you to debug in reverse.
Choose from any signal your OS supports to send to the inferior. For example, to mock `CTRL+C` in plain gdb, you can send `SIGINT` to interrupt the inferior process. If the inferior process is hung for some reason, you can send `SIGKILL`, etc.
Signals are also recognized by `gdbgui`, and a button is presented to let you step back into the program and inspect the program's state in case it exits unexpectedly.
0 commit comments