summaryrefslogtreecommitdiff
path: root/src/user/app/ps
diff options
context:
space:
mode:
authordzwdz2023-06-17 17:53:23 +0200
committerdzwdz2023-06-17 17:53:23 +0200
commit657585026a375d2cb2d06ab400f9deb487d89a17 (patch)
treef777a03d136405128d1ea5b947101d863f3e81de /src/user/app/ps
parent84fa0102c6906252999967925f32098ab6d5a259 (diff)
libc: expand psdata into a proper struct, include executable base
this is very useful for debugging userland programs using the qemu gdb stub
Diffstat (limited to 'src/user/app/ps')
-rw-r--r--src/user/app/ps/ps.c2
1 files changed, 1 insertions, 1 deletions
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)");
}