Bug#122383: your bug -- manpages-dev: Ptrace manpage on IA64 is for Linux 2.2
On Mon, Jul 23, 2012 at 11:32 PM, Simon Paillard wrote: > tags 122383 +confirmed > thanks > > Hi, > > On Thu, Dec 22, 2005 at 11:45:21AM +0100, Johan Walles wrote: >> 2005/12/21, Justin Pryzby : >> > Does this bug still apply in recent manpages packages? >> >> Yes. Although not to the same extent as before. >> >> PTRACE_GETFPREGS still doesn't exist on ia64. The man page implies it >> does. It's documented and the documentation says nothing about this >> function not existing on some platforms. >> >> The attached program builds and runs fine on ia32. It doesn't even >> build on ia64: "error: `PTRACE_GETFPREGS' undeclared". Possibly it's >> broken on other platforms as well, although the ia64 is the only >> non-mainstream platform I have access to. > > This doesn't build either on ia64 today, with the same error. > > And ptrace.2 doesn't mention such kind of function unavailability > (except arguments order change for sparc). For 3.44, I've added a note to the page to say that PTRAGE_GETREGS PTRAGE_SETREGS PTRAGE_GETFPREGS PTRAGE_SETFPREGS are not available on all architectures. Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface"; http://man7.org/tlpi/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#122383: your bug -- manpages-dev: Ptrace manpage on IA64 is for Linux 2.2
tags 122383 +confirmed thanks Hi, On Thu, Dec 22, 2005 at 11:45:21AM +0100, Johan Walles wrote: > 2005/12/21, Justin Pryzby : > > Does this bug still apply in recent manpages packages? > > Yes. Although not to the same extent as before. > > PTRACE_GETFPREGS still doesn't exist on ia64. The man page implies it > does. It's documented and the documentation says nothing about this > function not existing on some platforms. > > The attached program builds and runs fine on ia32. It doesn't even > build on ia64: "error: `PTRACE_GETFPREGS' undeclared". Possibly it's > broken on other platforms as well, although the ia64 is the only > non-mainstream platform I have access to. This doesn't build either on ia64 today, with the same error. And ptrace.2 doesn't mention such kind of function unavailability (except arguments order change for sparc). -- Simon Paillard -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#122383: your bug -- manpages-dev: Ptrace manpage on IA64 is for Linux 2.2
2005/12/21, Justin Pryzby <[EMAIL PROTECTED]>: > Does this bug still apply in recent manpages packages? Yes. Although not to the same extent as before. PTRACE_GETFPREGS still doesn't exist on ia64. The man page implies it does. It's documented and the documentation says nothing about this function not existing on some platforms. The attached program builds and runs fine on ia32. It doesn't even build on ia64: "error: `PTRACE_GETFPREGS' undeclared". Possibly it's broken on other platforms as well, although the ia64 is the only non-mainstream platform I have access to. Regards //Johan /* This program attempts to get the FP regs out of another process, * just to see if that's doable. */ #include #include #include #include #include #include #include static const char *describeStatus(int status) { static char statusDescription[100]; if (WIFEXITED(status)) { sprintf(statusDescription, "exited with status %d", WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { sprintf(statusDescription, "got terminating signal %d", WTERMSIG(status)); } else if (WIFSTOPPED(status)) { sprintf(statusDescription, "got stop signal %d", WSTOPSIG(status)); } else { sprintf(statusDescription, "received unknown event %#x", status); } return statusDescription; } int main(int argc, char *argv[]) { pid_t childpid; childpid = fork(); assert(childpid >= 0); if (childpid > 0) { // Parent process int status; // Allocate enough space for any CPU's floating point context void *fpregs = malloc(123456); assert(waitpid(childpid, &status, WUNTRACED) == childpid); printf("Parent: Child %s\n", describeStatus(status)); assert(ptrace(PTRACE_GETFPREGS, childpid, NULL, fpregs) == 0); printf("Parent: Successfully fetched floating point registers from child\n"); assert(ptrace(PTRACE_CONT, childpid, 0, 0) == 0); assert(waitpid(childpid, &status, WUNTRACED) == childpid); printf("Parent: Child %s\n", describeStatus(status)); /* assert(waitpid(childpid, &status, WUNTRACED) == childpid); printf("Parent: Child %s\n", describeStatus(status)); */ sleep(2); printf("Parent: Bye!\n"); return 0; } else { // Child process char *runme[] = { "sleep", "3", NULL }; assert(ptrace(PTRACE_TRACEME) == 0); printf("Child %d: exec()ing %s\n", getpid(), runme[0]); execvp(runme[0], runme); /* execl("/bin/sh", "/bin/sh", "-c", "date ; sleep 1", NULL); */ // execlp("date", "date", NULL); // execl("./crashme", "crashme", NULL); perror("exec() failed"); return 1; } }