From 657585026a375d2cb2d06ab400f9deb487d89a17 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 17 Jun 2023 17:53:23 +0200 Subject: libc: expand psdata into a proper struct, include executable base this is very useful for debugging userland programs using the qemu gdb stub --- src/user/app/ps/ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/user/app/ps') diff --git a/src/user/app/ps/ps.c b/src/user/app/ps/ps.c index d2b9ded..76a5841 100644 --- a/src/user/app/ps/ps.c +++ b/src/user/app/ps/ps.c @@ -33,7 +33,7 @@ main(void) warn("couldn't open \"%s\"", procbuf); strcpy(procbuf, "(can't peek)"); } else { - fseek(g, (long)_libc_psdata, SEEK_SET); + fseek(g, (long)&_psdata_loc->desc, SEEK_SET); if (fread(procbuf, 1, 128, g) <= 0) { strcpy(procbuf, "(no psdata)"); } -- cgit v1.2.3