From c34075ed1d1c51191eaeff22ce93711889228e47 Mon Sep 17 00:00:00 2001 From: AKuHAK <621640+AKuHAK@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:29:30 +0200 Subject: [PATCH] Fixed example a bit --- .github/workflows/compilation.yml | 2 ++ README | 6 ++++-- ps2.cmd | 9 --------- ps2.sh | 8 ++++++++ sample/Makefile | 7 ++++--- sample/{main.c => testgdb.c} | 0 6 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 ps2.cmd create mode 100644 ps2.sh rename sample/{main.c => testgdb.c} (100%) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 7a9868b..bdeb452 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -27,6 +27,7 @@ jobs: name: sample path: | sample/*.elf + sample/*.irx - name: Create release if: github.ref == 'refs/heads/master' @@ -37,3 +38,4 @@ jobs: title: "Latest development build" files: | sample/*.elf + sample/*.irx diff --git a/README b/README index cafdbac..0fefed4 100644 --- a/README +++ b/README @@ -2,8 +2,10 @@ Writing/Reading variables, memory, registers (only as 32bit), call stack - works. -Usage: run app with ps2link -mips64r5900el-ps2-elf-gdb -ex 'target remote:192.168.0.10:12' +Example usage: run sample with ps2link: +ps2client -h 192.168.1.13 execee host:testgdb.elf +in nanother terminal +mips64r5900el-ps2-elf-gdb -x ps2.sh TODO: rewrite metwork stack diff --git a/ps2.cmd b/ps2.cmd deleted file mode 100644 index 2d21a7a..0000000 --- a/ps2.cmd +++ /dev/null @@ -1,9 +0,0 @@ -set logging on ~/ps2dev/gdb.log -symbol-file ~/ps2dev/ps2gdbStub.elf -set endian little -set verbose 1 -set language asm -set output-radix 16 -target remote 192.168.0.10:12 -break wait_a_while -c diff --git a/ps2.sh b/ps2.sh new file mode 100644 index 0000000..166bb76 --- /dev/null +++ b/ps2.sh @@ -0,0 +1,8 @@ +target remote 192.168.1.13:12 +symbol-file sample/testgdb.elf +layout src +layout asm +layout split +list main +b testgdb.c:12 +c diff --git a/sample/Makefile b/sample/Makefile index a5e5d5d..1e854ae 100644 --- a/sample/Makefile +++ b/sample/Makefile @@ -2,18 +2,19 @@ # Makefile template # -EE_BIN = sample_gdb.elf -EE_OBJS = main.o +EE_BIN = testgdb.elf +EE_OBJS = testgdb.o EE_CFLAGS += -g -w EE_LIBS = -ldebug -lps2gdbStub -lps2ips EE_LDFLAGS += -L../lib all: + cp -f $(PS2SDK)/iop/irx/ps2ips.irx ./ $(MAKE) $(EE_BIN) clean: - rm -f $(EE_BIN) $(EE_OBJS) + rm -f $(EE_BIN) $(EE_OBJS) ps2ips.irx include $(PS2SDK)/samples/Makefile.pref include $(PS2SDK)/samples/Makefile.eeglobal diff --git a/sample/main.c b/sample/testgdb.c similarity index 100% rename from sample/main.c rename to sample/testgdb.c