diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a4bc2eb2f..503409a95 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,4 +1,4 @@ -name: CI Coverage for PR +name: Coverage on: pull_request_target: @@ -14,16 +14,18 @@ jobs: coverage: env: PY_VER: '' - runs-on: ubuntu-latest + runs-on: ubuntu-24.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 python3 -m pip install --upgrade pip --quiet - - name: Run test coverage + export NEEDRESTART_MODE=n + sudo apt-get update -qq + sudo apt-get install -qq -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 install -y python3-full + + - name: Run coverage id: get_coverage env: ALLOWED_MARGIN: 0.01 @@ -41,7 +43,7 @@ jobs: echo "current_score=${current_score}" >> $GITHUB_OUTPUT echo "score_diff=${score_diff}" >> $GITHUB_OUTPUT - - name: Post comment + - name: Post results uses: actions/github-script@v7 with: script: | diff --git a/LICENSE b/LICENSE index d770a8f40..11030ec99 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2024 crazy rabbidz +Copyright (c) 2013-2025 crazy rabbidz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 4189c63a5..b2b355c0b 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ try to reach out for help on the Discord channel or submit an issue. | Documentation |License | Compatibility | CI Tests (`main`) | |:---:|:---:|:---|--| -| [![Documentation](https://github.com/hugsy/gef/actions/workflows/generate-docs.yml/badge.svg)](https://github.com/hugsy/gef/actions/workflows/generate-docs.yml) | [![MIT](https://img.shields.io/packagist/l/doctrine/orm.svg?maxAge=2592000?style=plastic)](https://github.com/hugsy/gef/blob/main/LICENSE) | [![Python 3](https://img.shields.io/badge/Python-3-green.svg)](https://github.com/hugsy/gef/) | [![CI Test for GEF](https://github.com/hugsy/gef/actions/workflows/run-tests.yml/badge.svg)](https://github.com/hugsy/gef/actions/workflows/run-tests.yml) | +| [![Documentation](https://github.com/hugsy/gef/actions/workflows/generate-docs.yml/badge.svg)](https://github.com/hugsy/gef/actions/workflows/generate-docs.yml) | [![MIT](https://img.shields.io/packagist/l/doctrine/orm.svg?maxAge=2592000?style=plastic)](https://github.com/hugsy/gef/blob/main/LICENSE) | [![Python 3](https://img.shields.io/badge/Python-3-green.svg)](https://github.com/hugsy/gef/) | [![CI Test for GEF](https://github.com/hugsy/gef/actions/workflows/tests.yml/badge.svg)](https://github.com/hugsy/gef/actions/workflows/tests.yml) | ## Contribute diff --git a/gef.py b/gef.py index bd5eb8796..342d581b0 100644 --- a/gef.py +++ b/gef.py @@ -3703,7 +3703,7 @@ def new_objfile_handler(evt: "gdb.NewObjFileEvent | None") -> None: if evt: path = evt.new_objfile.filename or "" elif progspace: - path = progspace.filename + path = progspace.filename or "" else: raise RuntimeError("Cannot determine file path") try: @@ -4901,7 +4901,7 @@ def do_invoke(self, argv: list[str]) -> None: try: git = which("git") - except: + except FileNotFoundError: git = None if git: @@ -11403,7 +11403,7 @@ def file(self) -> pathlib.Path | None: return self.remote.file progspace = gdb.current_progspace() assert progspace - fpath: str = progspace.filename + fpath: str = progspace.filename or "" if fpath and not self._file: self._file = pathlib.Path(fpath).expanduser() return self._file @@ -11547,7 +11547,7 @@ def file(self) -> pathlib.Path: if not filename: raise RuntimeError("No session started") start_idx = len("target:") if filename.startswith("target:") else 0 - self._file = pathlib.Path(progspace.filename[start_idx:]) + self._file = pathlib.Path(filename[start_idx:]) return self._file @property