mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 11:53:24 +00:00
Add documentation for OSDK profiling
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
eca9aacbf0
commit
a67a6e6a38
@ -2,13 +2,18 @@
|
||||
|
||||
## Overview
|
||||
|
||||
`cargo osdk debug` is used to debug a remote target via GDB.
|
||||
The usage is as follows:
|
||||
`cargo osdk debug` is used to debug a remote target via GDB. You need to start
|
||||
a running server to debug with. This is accomplished by the `run` subcommand
|
||||
with `--gdb-server`. Then you can use the following command to attach to the
|
||||
server and do debugging.
|
||||
|
||||
```bash
|
||||
cargo osdk debug [OPTIONS]
|
||||
```
|
||||
|
||||
Note that when KVM is enabled, hardware-assisted break points (`hbreak`) are
|
||||
needed instead of the normal break points (`break`/`b`) in GDB.
|
||||
|
||||
## Options
|
||||
|
||||
`--remote <REMOTE>`:
|
||||
@ -18,13 +23,18 @@ or a TCP port on an IP address.
|
||||
|
||||
## Examples
|
||||
|
||||
- To debug a remote target via a
|
||||
[QEMU GDB stub](https://www.qemu.org/docs/master/system/gdb.html),
|
||||
- connect to an unix socket, e.g., `./debug`;
|
||||
```bash
|
||||
cargo osdk debug --remote ./debug
|
||||
```
|
||||
- connect to a TCP port (`[IP]:PORT`), e.g., `localhost:1234`.
|
||||
```bash
|
||||
cargo osdk debug --remote localhost:1234
|
||||
```
|
||||
To debug a remote target started with
|
||||
[QEMU GDB stub](https://www.qemu.org/docs/master/system/gdb.html) or the `run`
|
||||
subcommand, use the following commands.
|
||||
|
||||
Connect to an unix socket, e.g., `./debug`:
|
||||
|
||||
```bash
|
||||
cargo osdk debug --remote ./debug
|
||||
```
|
||||
|
||||
Connect to a TCP port (`[IP]:PORT`), e.g., `localhost:1234`:
|
||||
|
||||
```bash
|
||||
cargo osdk debug --remote localhost:1234
|
||||
```
|
||||
|
Reference in New Issue
Block a user