/* Machine independent support for SVR4 /proc (process file system) for GDB.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
Written by Michael Snyder at Cygnus Solutions.
Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others.
#include <sys/user.h> /* for struct user */
#endif
#include <fcntl.h> /* for O_RDWR etc. */
-#include <sys/wait.h>
+#include "gdb_wait.h"
#include "proc-utils.h"
int
write_with_trace (int fd, void *varg, size_t len, char *file, int line)
{
- int i;
+ int i = ARRAY_SIZE (rw_table) - 1;
int ret;
procfs_ctl_t *arg = (procfs_ctl_t *) varg;
break;
default:
{
-#ifdef BREAKPOINT
- static unsigned char break_insn[] = BREAKPOINT;
-
- if (len == sizeof (break_insn) &&
- memcmp (arg, &break_insn, len) == 0)
- fprintf (procfs_file ? procfs_file : stdout,
- "write (<breakpoint at 0x%08lx>) \n",
- (unsigned long) lseek_offset);
- else
-#endif
if (rw_table[i].name)
fprintf (procfs_file ? procfs_file : stdout,
"write (%s) %s\n",
if (info_verbose)
fprintf (procfs_file ? procfs_file : stdout,
"%s:%d -- ", file, line);
- fprintf (procfs_file ? procfs_file : stdout, msg);
+ fprintf (procfs_file ? procfs_file : stdout, "%s", msg);
if (procfs_file)
fflush (procfs_file);
}
var_boolean, (char *) &procfs_trace,
"Set tracing for /proc api calls.\n", &setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_procfs_trace_cmd);
set_cmd_completer (c, filename_completer);
(char *) &procfs_filename,
"Set filename for /proc tracefile.\n", &setlist);
- add_show_from_set (c, &showlist);
+ deprecated_add_show_from_set (c, &showlist);
set_cmd_sfunc (c, set_procfs_file_cmd);
}