Skip to content

Commit f6e18e9

Browse files
committed
Create embox_execute_debug_en.md
Translated few parts of this documents in English.
1 parent d806167 commit f6e18e9

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

en/embox_execute_debug_en.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Running
2+
3+
## Uploading on qemu
4+
You can run the built image on qemu. The simpliest way is to do `./scripts/qemu/auto_qemu` script:
5+
6+
```c
7+
$ sudo ./scripts/qemu/auto_qemu
8+
```
9+
This script makes `tuntab`, it needs to get superuser rights for this purpose. Moreover, the `ethtool` utility used in this script. Installing of `ethtool` for main Debian systems is in the line below:
10+
11+
```c
12+
$ sudo apt-get install ethtool
13+
```
14+
If the running has finished successfully, messages will output on qemu screen. After running system the "embox" inviting will appear, so now you can execute commands for implementation. For example, `help` will display list of available commands.
15+
16+
For checking of connection you should ping the `10.0.2.16` interface. If connection is installed, you can to connect to the terminal, using `telnet`.
17+
18+
To exit from qemu, you should type at first `ctrl + a`, and then `X`.
19+
20+
21+
# Debugging
22+
23+
You can use the same script for working in debugging mod. For this purpose just send `-s`, `-S`, `-no-kvm` flags as parameters to this script as follows:
24+
25+
```c
26+
$ sudo ./scripts/qemu/auto_qemu -s -S -no-kvm
27+
```
28+
After qemu will wait connection of gdb-client.
29+
30+
For debugging with help of console bebugger it's necessary to run gdb in other terminal:
31+
32+
```c
33+
$ gdb ./build/base/bin/embox
34+
...
35+
(gdb) target extended-remote :1234
36+
(gdb) continue
37+
```
38+
The system'll start loading.
39+
40+
In any moment you can type `ctrl + c` in gdb-terminal and see current thread stack (backtrace), and then to install breakpoints `(break <name of function>, break <name of file>:<line number>)`.

0 commit comments

Comments
 (0)