Removed debug dumps from the PM and FS servers. The dumps are now done by the

IS servers, which obtains a copy of the data through the getsysinfo() system
call. CTRL-F1 now is a special TTY key to shows function key mappings.
This commit is contained in:
Jorrit Herder
2005-06-07 14:43:35 +00:00
parent 4de736535c
commit c2cd510adf
20 changed files with 616 additions and 655 deletions
+1 -3
View File
@@ -13,7 +13,7 @@ CC = exec cc
CFLAGS = -I$i
LDFLAGS = -i
OBJ = main.o forkexit.o break.o exec.o dmp.o time.o \
OBJ = main.o forkexit.o break.o exec.o time.o \
signal.o alloc.o utility.o table.o trace.o getset.o misc.o
# build local binary
@@ -94,8 +94,6 @@ misc.o: $s/svrctl.h
misc.o: mproc.h
misc.o: param.h
dmp.o: $a
signal.o: $a
signal.o: $s/stat.h
signal.o: $h/callnr.h
-81
View File
@@ -1,81 +0,0 @@
/* This file contains procedures to dump to PM' data structures.
*
* The entry points into this file are
* do_fkey_pressed: a function key was pressed
* mproc_dump: display PM process table
*
* Created:
* May 11, 2005: by Jorrit N. Herder
*/
#include "pm.h"
#include <minix/callnr.h>
#include <minix/com.h>
#include <minix/keymap.h>
#include <signal.h>
#include "mproc.h"
FORWARD _PROTOTYPE( void mproc_dmp, (void));
/*===========================================================================*
* do_fkey_pressed *
*===========================================================================*/
PUBLIC int do_fkey_pressed(void)
{
printf("Process Manager debug dump: ");
#if DEAD_CODE
switch (m_in.FKEY_NUM) {
#else
switch (m_in.NOTIFY_FLAGS) {
#endif
case SF7: mproc_dmp(); break;
default:
#if DEAD_CODE
printf("PM: unhandled notification for Shift+F%d key.\n",
m_in.FKEY_NUM);
#else
printf("PM: unhandled notification for Shift+F%d key.\n",
m_in.NOTIFY_FLAGS);
#endif
}
}
/*===========================================================================*
* mproc_dmp *
*===========================================================================*/
PRIVATE void mproc_dmp()
{
struct mproc *mp;
int i, n=0;
static int prev_i;
printf("Process Table\n");
printf("-process- -nr-prnt- -pid/grp- --uid---gid-- -flags- --ignore--catch--block--\n");
for (i=prev_i; i<NR_PROCS; i++) {
mp = &mproc[i];
if (mp->mp_pid <= 0) continue;
if (++n > 22) break;
printf("%8.8s %4d%4d %4d%4d ",
mp->mp_name, i, mp->mp_parent, mp->mp_pid, mp->mp_procgrp);
printf("%d (%d) %d (%d) ",
mp->mp_realuid, mp->mp_effuid, mp->mp_realgid, mp->mp_effgid);
printf("0x%04x ",
mp->mp_flags);
printf("0x%04x 0x%04x 0x%04x",
mp->mp_ignore, mp->mp_catch, mp->mp_sigmask);
printf("\n");
}
if (i >= NR_PROCS) i = 0;
else printf("--more--\r");
prev_i = i;
}
/*===========================================================================*
* ...._dmp *
*===========================================================================*/
+4
View File
@@ -75,6 +75,10 @@ PUBLIC int do_getsysinfo()
src_addr = (vir_bytes) &proc_addr;
len = sizeof(struct mproc *);
break;
case SI_PROC_TAB: /* copy entire process table */
src_addr = (vir_bytes) mproc;
len = sizeof(struct mproc) * NR_PROCS;
break;
default:
return(EINVAL);
}