Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use target remote for remote connections #1151

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d28c4a3
added ruff linter + fixes
hugsy Sep 22, 2024
cde95b3
checkpoint
hugsy Sep 24, 2024
b83586e
removed `Set` and `Tuple` types (replaced with `tuple` and `set`)
hugsy Nov 1, 2024
32311d7
`Union` type -> `|`
hugsy Nov 1, 2024
741ce7c
removed Tuple in tests
hugsy Nov 1, 2024
854912b
Merge branch 'main' into hugsy/lint-fmt
hugsy Nov 2, 2024
f47f51e
fixed type typo
hugsy Nov 2, 2024
d5d544d
`Optional` is optional
hugsy Nov 2, 2024
60be6a1
fixed ruff toml
hugsy Nov 2, 2024
dc28938
revert changes, only focus on py3.10 improvements
hugsy Nov 2, 2024
417ac63
final fixes
hugsy Nov 2, 2024
9fb1d71
added `untracked` dir to gitignore
hugsy Nov 3, 2024
a277661
checkpoint: added new remote modes, gdbserver & gdbserver-multi work
hugsy Nov 3, 2024
6d166f0
checkpoint: added very basic pytests
hugsy Nov 4, 2024
771a598
removed all obsolete code
hugsy Nov 5, 2024
79447be
fixed `gef-remote` from tests, using only `target remote`
hugsy Nov 5, 2024
ea873bb
use `NotImplementedError`
hugsy Nov 7, 2024
4ae683f
plop
hugsy Nov 7, 2024
8130895
minor lint
hugsy Nov 7, 2024
7973a3f
allow mock mem layout for old qemu versions
hugsy Nov 7, 2024
8cc2231
added repr for Gef class
hugsy Nov 8, 2024
2ba9ac7
[tests] use `gdb-multiarch` by default
hugsy Nov 8, 2024
437cbe2
added regression for issue #1131
hugsy Nov 8, 2024
e5a02b1
constantify all the things
hugsy Nov 8, 2024
68fcc1d
officially deprecating `gef-remote`
hugsy Nov 8, 2024
e8527ad
duplicate test line
hugsy Nov 10, 2024
14c35bd
allow gef to save temporary values
hugsy Nov 10, 2024
03f9cf9
Merge branch 'main' into hugsy/revisit-target-remote
hugsy Nov 10, 2024
2a5c585
test fix
hugsy Nov 10, 2024
36c953c
oops
hugsy Nov 10, 2024
68505a6
bleh
hugsy Nov 10, 2024
02af4d4
revert
hugsy Nov 10, 2024
c89c280
damnit
hugsy Nov 10, 2024
77aa954
restored gdb-multiarch as default for tests
hugsy Nov 11, 2024
1d9f897
minor
hugsy Nov 11, 2024
623ebf1
test
hugsy Nov 11, 2024
532e45d
asd
hugsy Nov 11, 2024
fd0bf0a
Merge branch 'hugsy/revisit-target-remote' of https://github.com/hugs…
hugsy Nov 11, 2024
d262ca5
Merge branch 'main' into hugsy/revisit-target-remote
hugsy Nov 11, 2024
7a9e494
Update generate-coverage-docs.sh
hugsy Nov 11, 2024
b9f564f
Update generate-coverage-docs.sh
hugsy Nov 11, 2024
7ea8588
Update coverage.yml
hugsy Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
coverage:
env:
PY_VER: ''
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y gdb-multiarch python3-dev python3-pip python3-wheel python3-setuptools git cmake gcc g++ pkg-config libglib2.0-dev gdbserver qemu-user curl
sudo apt-get -qq install -y gdb-multiarch python3-dev python3-pip python3-wheel python3-setuptools git cmake gcc g++ pkg-config libglib2.0-dev gdbserver qemu-user-static qemu-user curl
sudo python3 -m pip install --upgrade pip --quiet
- name: Run test coverage
id: get_coverage
Expand All @@ -32,8 +32,9 @@ jobs:
echo PY_VER=`gdb -q -nx -ex "pi print('.'.join(map(str, sys.version_info[:2])))" -ex quit` >> $GITHUB_ENV
echo GEF_CI_NB_CPU=`grep -c ^processor /proc/cpuinfo` >> $GITHUB_ENV
echo GEF_CI_ARCH=`uname --processor` >> $GITHUB_ENV
python${{ env.PY_VER }} -m pip install --user --upgrade -r tests/requirements.txt --quiet
python${{ env.PY_VER }} -m pip install --user --upgrade -r tests/requirements.txt -r docs/requirements.txt --quiet
current_score=$(curl --silent https://hugsy.github.io/gef/coverage/gef_py.html | grep pc_cov | sed 's?.*<span class="pc_cov">\([^%]*\)%</span>?\1?g')
make -C tests/binaries
bash scripts/generate-coverage-docs.sh
new_score=$(cat docs/coverage/gef_py.html | grep pc_cov | sed 's?.*<span class="pc_cov">\([^%]*\)%</span>?\1?g')
score_diff=$(python -c "print(f'{${new_score} - ${current_score}:.04f}')")
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
runner: [ubuntu-24.04, ubuntu-22.04]

name: "Run Unit tests on ${{ matrix.runner }}"
name: "Tests/${{ matrix.runner }}"
runs-on: ${{ matrix.runner }}
defaults:
run:
Expand Down
13 changes: 3 additions & 10 deletions docs/commands/gef-remote.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
## Command `gef-remote`

[`target remote`](https://sourceware.org/gdb/onlinedocs/gdb/Remote-Debugging.html#Remote-Debugging)
is the traditional GDB way of debugging process or system remotely. However this command by itself
does a limited job (80's bandwith FTW) to collect more information about the target, making the
process of debugging more cumbersome. GEF greatly improves that state with the `gef-remote` command.

📝 **Note**: If using GEF, `gef-remote` **must** be your way or debugging remote processes, never
`target remote`. Maintainers will provide minimal support or help if you decide to use the
traditional `target remote` command. For many reasons, you **should not** use `target remote` alone
with GEF. It is still important to note that the default `target remote` command has been
overwritten by a minimal copy `gef-remote`, in order to make most tools relying on this command work.
📝 **IMPORTANT NOTE**: `gef-remote` is deprecated since 2024.09 in favor of `target remote`. The
command will be removed in a future release. Do not rely on it.


`gef-remote` can function in 2 ways:

Expand Down
Loading
Loading