Skip to content

Xbox Cloud Gaming app for PS5 Homebrew

C

tools/ps5/link.sh: a development link keeps its symbols in vX.Y.Z-dev

Rafael Abud Ferreira04321b841f63
diff --git a/AGENTS.md b/AGENTS.md
index ea5b642..a3f4bed 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -104,5 +104,5 @@ Para evitar degradação de desempenho, latência alta e manter a interação á
- O **PS5 é a plataforma principal**; Linux e Windows rodam o mesmo núcleo do app (`src/app/app_core.cpp`) com backends próprios. O mapa completo está em `docs/multiplatform.md`.
- **Toda alteração deve manter Linux e Windows compilando.** Uma funcionalidade exclusiva do PS5 vira no-op controlado por capacidade no desktop (`display::caps()`, `shell::canSelfUpdate()`...) ou tem a opção escondida — nunca quebra o build nem trava o app.
- **NUNCA chame funções `sce*`, inclua headers do SDK do PS5 ou use `#if XCLOUD_PS5` fora dos arquivos de backend do PS5** (`*_ps5.cpp`, `src/platform/ps5/`, `src/display/gpu.cpp`). O script `tools/check-platform-boundaries.sh` verifica isso (também no CI).
-- Antes de considerar uma alteração pronta, compile os alvos de desktop (`ninja -C build-test` ou `build-host`, incluindo `psbox-headless`, e rode `xcloud-tests`), o app do PS5 (`ninja -C build-ps5 xcloud_app` + `bash tools/ps5/link.sh build-ps5`) e rode o script de fronteiras.
+- Antes de considerar uma alteração pronta, compile os alvos de desktop (`ninja -C build-test` ou `build-host`, incluindo `psbox-headless`, e rode `xcloud-tests`), o app do PS5 (`ninja -C build-ps5 xcloud_app` + `bash tools/ps5/link.sh build-ps5`) e rode o script de fronteiras. Um link de desenvolvimento grava os símbolos em `symbols/vX.Y.Z-dev`; só o `tools/release.sh` grava `symbols/vX.Y.Z` (os da release, usados para decodificar crashes dos usuários).
- O fluxo de validação por screenshots no console (seção 2) continua obrigatório para mudanças de UI no PS5.
diff --git a/ROADMAP.md b/ROADMAP.md
index 6ee3abd..87bc2ec 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -206,7 +206,7 @@ is rolled back at the next start), then the app restarts itself
- Cards: the console's keyboard-and-mouse icon on MKB games, its controller icon on the others; a Mouse & keyboard search filter; the players' pads drawn with the console's controller icon.
- Settings grouped (language and sign-in country; stream; sound; controller and keyboard; updates last); the game settings likewise.
- Sign-in: the xCloud login is tried again on a 5xx (six tries over ~25 s); the renewed refresh token is saved at once. The queue's wait from `/v1/waittime/{titleId}` while queued; the pictures' quantiser (QP) in the statistics line.
-- Crash reports: a fatal signal records the faulting instruction's offset in eboot (`pc=eboot+0x...`), the accessed address (`addr=0x...`) and the caller return addresses (`bt=...`), shown on the report panel and in the GitHub issue link; `tools/ps5/link.sh` keeps `symbols/vX.Y.Z/eboot.elf` and `tools/symbolize.sh` translates offsets back to function and `file:line`.
+- Crash reports: a fatal signal records the faulting instruction's offset in eboot (`pc=eboot+0x...`), the accessed address (`addr=0x...`) and the caller return addresses (`bt=...`), shown on the report panel and in the GitHub issue link; `tools/release.sh` keeps `symbols/vX.Y.Z/eboot.elf` (a development link with `tools/ps5/link.sh`: `symbols/vX.Y.Z-dev`) and `tools/symbolize.sh` translates offsets back to function and `file:line`.
## Next
diff --git a/docs/multiplatform.md b/docs/multiplatform.md
index 077dc35..dc19481 100644
--- a/docs/multiplatform.md
+++ b/docs/multiplatform.md
@@ -137,5 +137,7 @@ shared code:
ninja -C build-ps5 xcloud_app && tools/ps5/link.sh build-ps5
bash tools/check-platform-boundaries.sh
```
- A change to the PS5's UI is still checked on the console with its
- screenshots (`AGENTS.md`).
+ A development link saves its symbols in `symbols/vX.Y.Z-dev`; only
+ `tools/release.sh` writes `symbols/vX.Y.Z`, the release's, which decode
+ users' crash reports (`tools/symbolize.sh`). A change to the PS5's UI is
+ still checked on the console with its screenshots (`AGENTS.md`).
diff --git a/tools/ps5/link.sh b/tools/ps5/link.sh
index ab3a7df..acb958a 100755
--- a/tools/ps5/link.sh
+++ b/tools/ps5/link.sh
@@ -76,9 +76,16 @@ libs=("$build/libxcloud_ui.a"
--as-needed "$sdk"/target/lib/*.so
# Keep the ELF with symbols and line tables (by version) so crash offsets
-# (pc=eboot+0x...) can be translated back to function and line.
-ver=${XC_VERSION:-v$(sed -n 's/^project(xcloud_ps5 VERSION \([0-9.]*\).*/\1/p' "$root/CMakeLists.txt")}
-[[ $ver == v* ]] || ver="v$ver"
+# (pc=eboot+0x...) can be translated back to function and line. Only a
+# release names its version (tools/release.sh sets XC_VERSION=vX.Y.Z); any
+# other link is a development build and goes to vX.Y.Z-dev, so it never
+# replaces the symbols of the release users run (tools/symbolize.sh).
+if [[ -n ${XC_VERSION:-} ]]; then
+ ver=$XC_VERSION
+ [[ $ver == v* ]] || ver="v$ver"
+else
+ ver="v$(sed -n 's/^project(xcloud_ps5 VERSION \([0-9.]*\).*/\1/p' "$root/CMakeLists.txt")-dev"
+fi
mkdir -p "$root/symbols/$ver"
cp -f "$work/llvm-pie.elf" "$root/symbols/$ver/eboot.elf"
diff --git a/tools/symbolize.sh b/tools/symbolize.sh
index 9d2af09..50c5969 100755
--- a/tools/symbolize.sh
+++ b/tools/symbolize.sh
@@ -3,11 +3,16 @@
# Copyright (C) 2026 RafaelNGP
# Translates crash report offsets (pc=eboot+0x...) into function and file:line.
#
-# tools/symbolize.sh [vX.Y.Z] <offset-or-crash-line...>
+# tools/symbolize.sh [vX.Y.Z[-dev]] <offset-or-crash-line...>
+#
+# A release's symbols are in symbols/vX.Y.Z (tools/release.sh); a development
+# link's in symbols/vX.Y.Z-dev (tools/ps5/link.sh). A development build
+# reports the same version as the release, so name -dev for its crashes.
#
# Examples:
# tools/symbolize.sh v0.9.8 0x1a2b3c
# tools/symbolize.sh v0.9.8 "crash: SIGSEGV pc=eboot+0x1a2b3c addr=0x0"
+# tools/symbolize.sh v1.0.0-dev 0x1a2b3c
# tools/symbolize.sh 0x1a2b3c
set -euo pipefail
@@ -24,12 +29,12 @@ fi
[[ -n $addr2line ]] || { echo "symbolize: llvm-addr2line not found" >&2; exit 1; }
if (( $# == 0 )); then
- echo "usage: tools/symbolize.sh [vX.Y.Z] <offset-or-crash-line...>" >&2
+ echo "usage: tools/symbolize.sh [vX.Y.Z[-dev]] <offset-or-crash-line...>" >&2
exit 1
fi
ver=""
-if [[ $1 =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+if [[ $1 =~ ^v?[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9.]+)?$ ]]; then
ver=$1
shift
fi