https://github.com/tfc/gdb_dummy
https://github.com/tfc/gdb_dummy
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/tfc/gdb_dummy
- Owner: tfc
- Created: 2018-02-25T13:33:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-12T07:57:50.000Z (over 7 years ago)
- Last Synced: 2025-01-13T16:47:51.161Z (over 1 year ago)
- Language: C++
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GDB Dummy
This application is a little demo-showcase that tries to implement the GDB protocol using the [attoparsecpp](https://github.com/tfc/attoparsecpp) library.
It is not complete at all and will never be complete. This is rather a vehicle to evaluate and extend the `attoparsecpp` library.
Current state of GDB dummy server:
- Understands initialization protocol of connecting GDB instance
- Supports reading and writing memory (Server implements dummy memory sandbox vector)
- Parser is directly attached to socket and blocks on `read()` for more bytes when it expects more input
## How to run
In one shell run:
``` bash
$ ./gdb_dummy
Listening on port 1234. Open a GDB instance and enter "target remote tcp:localhost:1234"
```
In another shell:
``` bash
$ gdb
GNU gdb (GDB) 8.1
# ...
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
0x0000ab08 in ?? ()
(gdb) x 0
0x0: 0x00000000
(gdb) s {int}0 = 0xaabbccdd # write memory
0x0000ab08 in ?? ()
(gdb) x 0 # read back same memory
0x0: 0xaabbccdd
(gdb) x 2
0x2: 0x0000aabb
```