Make it work with NetBSD 1.3.2.

1998-12-05  Martin Baulig  <martin@home-of-linux.org>

	* Make it work with NetBSD 1.3.2.

Well, it compiles without problems but not all features are currently
working; need to look a little bit closer at it.

Ok for now, think I'll install OpenBSD and test it there ...

Martin
This commit is contained in:
Martin Baulig
1998-12-05 18:52:09 +00:00
committed by Martin Baulig
parent d414a22ee3
commit 67a344b9d4
12 changed files with 108 additions and 14 deletions

View File

@@ -31,7 +31,9 @@
#include <sys/proc.h>
#include <sys/user.h>
#include <machine/pcb.h>
#ifdef __FreeBSD__
#include <machine/tss.h>
#endif
#include <unistd.h>
#include <fcntl.h>
@@ -148,10 +150,15 @@ glibtop_get_proc_kernel_p (glibtop *server,
* FreeBSD 3.0 at the moment.
*/
#else
#elsif (defined __FreeBSD__)
buf->kstk_esp = (u_int64_t) pcb.pcb_ksp;
buf->kstk_eip = (u_int64_t) pcb.pcb_pc;
buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;
#else
buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0;
buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip;
buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;
#endif
}