mirror of https://github.com/PCSX2/pcsx2.git
Add section on debugging with gdb
parent
7638f000f6
commit
0368b0b221
|
@ -3,12 +3,13 @@ NOTE: Only 32-bit architectures are supported, or distributions that allow the i
|
|||
## Index
|
||||
1. [Introduction](#introduction)
|
||||
2. [CMake Build System](#cmake-build-system)
|
||||
3. [Fedora](#fedora)
|
||||
3. [OpenSUSE Tumbleweed](#opensuse-tumbleweed)
|
||||
4. [Ubuntu PPA](#ubuntu-ppa)
|
||||
5. [Arch Linux](#arch-linux)
|
||||
6. [Ubuntu 20.04](#how-to-compile-pcsx2-in-2020-ubuntu-2004)
|
||||
7. [Gentoo](#how-to-compile-pcsx2-in-2020-gentoo--derivatives)
|
||||
3. [Debugging](#debugging)
|
||||
4. [Fedora](#fedora)
|
||||
5. [OpenSUSE Tumbleweed](#opensuse-tumbleweed)
|
||||
6. [Ubuntu PPA](#ubuntu-ppa)
|
||||
7. [Arch Linux](#arch-linux)
|
||||
8. [Ubuntu 20.04](#how-to-compile-pcsx2-in-2020-ubuntu-2004)
|
||||
9. [Gentoo](#how-to-compile-pcsx2-in-2020-gentoo--derivatives)
|
||||
|
||||
## Introduction
|
||||
|
||||
|
@ -163,6 +164,23 @@ Not all distributions and configurations were tested. In case you encounter a CM
|
|||
-- Build files have been written to: /mnt/playstation/emulateur/package/pcsx2.snapshot-4810
|
||||
```
|
||||
|
||||
## Debugging
|
||||
|
||||
It can be helpful to run PCSX2 under [GDB](https://www.gnu.org/software/gdb/) in order to set breakpoints and debug crashes.
|
||||
|
||||
To enable debugging with symbol names:
|
||||
- Run `build.sh` with the `--debug` option (not `--devel` or `--release`).
|
||||
- Ensure the `--strip` option is not enabled.
|
||||
- Consider enabling other `build.sh` flags as described above if they are useful for your debugging.
|
||||
|
||||
The built executable can then be debugged using `gdb ./bin/PCSX2`. Make sure you configure your plugin paths correctly within the PCSX2 GUI if you're making changes to plugins!
|
||||
|
||||
### Segmentation Faults
|
||||
|
||||
Segmentation faults (`SIGSEGV`) are [expected](https://github.com/PCSX2/pcsx2/issues/1806#issuecomment-278268282) when running recompiled code such as a game in PCSX2. When a segmentation fault occurs, use `bt` and check if the backtrace contains `recExecute`. If it does then continue execution using `c`.
|
||||
|
||||
Additionally, segfault printing can be disabled entirely in GDB using the command `handle SIGSEGV noprint`.
|
||||
|
||||
## Fedora
|
||||
|
||||
Just Add Rpmfusion non-free repo:
|
||||
|
|
Loading…
Reference in New Issue