diff --git a/.gitignore b/.gitignore index cc95f58..7d666a0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ *.sprx nid_db.xml aerolib.csv - +.gdb_history diff --git a/samples/arbitrary_syscall/Makefile b/samples/arbitrary_syscall/Makefile index 0bed477..770ee3c 100644 --- a/samples/arbitrary_syscall/Makefile +++ b/samples/arbitrary_syscall/Makefile @@ -25,7 +25,7 @@ endif ELF := arbitrary_syscall.elf -CFLAGS := -Wall -Werror +CFLAGS := -Wall -Werror -g all: $(ELF) @@ -38,3 +38,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/browser/Makefile b/samples/browser/Makefile index c1b445b..67b9006 100644 --- a/samples/browser/Makefile +++ b/samples/browser/Makefile @@ -26,7 +26,7 @@ endif ELF := browser.elf -CFLAGS := -Wall -Werror -DPS5_URL='"$(PS5_URL)"' +CFLAGS := -Wall -Werror -g -DPS5_URL='"$(PS5_URL)"' CFLAGS += -lSceSystemService -lSceUserService all: $(ELF) @@ -40,3 +40,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/hello_cxx/Makefile b/samples/hello_cxx/Makefile index 17a19e6..e7911b7 100644 --- a/samples/hello_cxx/Makefile +++ b/samples/hello_cxx/Makefile @@ -25,7 +25,7 @@ endif ELF := hello_cxx.elf -CFLAGS := -Wall -Werror +CFLAGS := -Wall -Werror -g all: $(ELF) @@ -38,3 +38,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/hello_sprx/Makefile b/samples/hello_sprx/Makefile index b64c3d0..40e1791 100644 --- a/samples/hello_sprx/Makefile +++ b/samples/hello_sprx/Makefile @@ -25,7 +25,7 @@ endif ELF := hello_sprx.elf -CFLAGS := -Wall -Werror -lSceRandom +CFLAGS := -Wall -Werror -g -lSceRandom all: $(ELF) @@ -38,3 +38,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/hello_stdio/Makefile b/samples/hello_stdio/Makefile index e753064..f9b2617 100644 --- a/samples/hello_stdio/Makefile +++ b/samples/hello_stdio/Makefile @@ -25,7 +25,7 @@ endif ELF := hello_stdio.elf -CFLAGS := -Wall -Werror +CFLAGS := -Wall -Werror -g all: $(ELF) @@ -38,3 +38,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/hello_world/Makefile b/samples/hello_world/Makefile index 5adf1de..01a9859 100644 --- a/samples/hello_world/Makefile +++ b/samples/hello_world/Makefile @@ -25,7 +25,7 @@ endif ELF := hello_world.elf -CFLAGS := -Wall -Werror +CFLAGS := -Wall -Werror -g all: $(ELF) @@ -38,3 +38,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/http2_get/Makefile b/samples/http2_get/Makefile index 1c9a046..bcdc1ac 100644 --- a/samples/http2_get/Makefile +++ b/samples/http2_get/Makefile @@ -25,7 +25,7 @@ endif ELF := http2_get.elf -CFLAGS := -Wall -Werror -lSceNet -lSceSsl -lSceHttp2 +CFLAGS := -Wall -Werror -g -lSceNet -lSceSsl -lSceHttp2 all: $(ELF) @@ -38,3 +38,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/hwinfo/Makefile b/samples/hwinfo/Makefile index cfbcfdf..1ba8fe9 100644 --- a/samples/hwinfo/Makefile +++ b/samples/hwinfo/Makefile @@ -25,7 +25,7 @@ endif ELF := hwinfo.elf -CFLAGS := -Wall -Werror -lkernel_sys +CFLAGS := -Wall -Werror -g -lkernel_sys all: $(ELF) @@ -38,3 +38,11 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" + diff --git a/samples/list_files/Makefile b/samples/list_files/Makefile index b91656c..bf33480 100644 --- a/samples/list_files/Makefile +++ b/samples/list_files/Makefile @@ -25,7 +25,7 @@ endif ELF := list_files.elf -CFLAGS := -Wall -Werror +CFLAGS := -Wall -Werror -g all: $(ELF) @@ -38,3 +38,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/mntinfo/Makefile b/samples/mntinfo/Makefile index 7e5e9a4..f33a82f 100644 --- a/samples/mntinfo/Makefile +++ b/samples/mntinfo/Makefile @@ -25,7 +25,7 @@ endif ELF := mntinfo.elf -CFLAGS := -Wall -Werror -lkernel_sys +CFLAGS := -Wall -Werror -g -lkernel_sys all: $(ELF) @@ -37,3 +37,11 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ + +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/samples/ps/Makefile b/samples/ps/Makefile index 8522a1f..74c1265 100644 --- a/samples/ps/Makefile +++ b/samples/ps/Makefile @@ -25,7 +25,7 @@ endif ELF := ps.elf -CFLAGS := -Wall -Werror +CFLAGS := -Wall -Werror -g all: $(ELF) @@ -38,3 +38,10 @@ clean: test: $(ELF) $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start"