Why does DCMD_PROC_GETGREG return EINVAL out of the devctl()?
Is this function not supported yet?
Here’s a code snippet, the file descriptor passed is #6, and is
used with other DCMD’s just fine:
static void
dump_procfs_greg (int fd)
{
procfs_greg g;
int sts;
int k;
// fetch information about the registers for this pid/tid
if ((sts = devctl (fd, DCMD_PROC_GETGREG, &g, sizeof (g), &k)) != EOK) {
fprintf (stderr, “%s: couldn’t get GETGREG information, sts %d, errno %d (%s)\n”, progname, sts, errno, strerror (errno));
exit (EXIT_FAILURE);
}
printf ("\tInfo from DCMD_PROC_GETGREG\n");
printf ("\t\tcs 0x%08X eip 0x%08X\n", g.x86.cs, g.x86.eip);
printf ("\t\tss 0x%08X esp 0x%08X\n", g.x86.ss, g.x86.esp);
printf ("\t\teax 0x%08X ebx 0x%08X\n", g.x86.eax, g.x86.ebx);
printf ("\t\tecx 0x%08X edx 0x%08X\n", g.x86.ecx, g.x86.edx);
printf ("\t\tedi 0x%08X esi 0x%08X\n", g.x86.edi, g.x86.esi);
printf ("\t\tebp 0x%08X exx 0x%08X\n", g.x86.ebp, g.x86.exx);
printf ("\t\tefl 0x%08X\n", g.x86.efl);
}
Anything obviously stupid here?
Cheers,
-RK
–
[If replying via email, you’ll need to click on the URL that’s emailed to you
afterwards to forward the email to me – spam filters and all that]
Robert Krten, PDP minicomputer collector http://www.parse.com/~pdp8/