diff options
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/proc-api.c | 4 | ||||
-rw-r--r-- | gdb/procfs.c | 30 |
3 files changed, 27 insertions, 17 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f6972c1..6ba9787 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2000-05-05 Michael Snyder <msnyder@seadog.cygnus.com> + + * procfs.c (many functions): change int cmd; to long cmd; + Solaris /proc API calls this parameter a long, and requires it + for 64-bit hosts (where sizeof(long) != sizeof(int)). UnixWare + calls it an int, but on existing UnixWare hosts, int and long + are the same size. So long it must be. If a future UnixWare + version has problems with this, we'll have to use autoconf. + * proc-api.c (write_with_trace): use long instead of int. + 2000-05-04 Mark Kettenis <kettenis@gnu.org> * i386-linux-nat.c: Define PT_READ_U and PT_WRITE_U if they're not diff --git a/gdb/proc-api.c b/gdb/proc-api.c index cbd1a68..7ee9bf3 100644 --- a/gdb/proc-api.c +++ b/gdb/proc-api.c @@ -440,14 +440,14 @@ static off_t lseek_offset; int write_with_trace (fd, arg, len, file, line) int fd; - int *arg; + long *arg; size_t len; char *file; int line; { int i; int ret; - int opcode = arg[0]; + long opcode = arg[0]; if (procfs_trace) { diff --git a/gdb/procfs.c b/gdb/procfs.c index 2dfde70..9f1dc10 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -1391,7 +1391,7 @@ proc_stop_process (pi) else { #ifdef NEW_PROC_API - int cmd = PCSTOP; + long cmd = PCSTOP; win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd)); #else /* ioctl method */ win = (ioctl (pi->ctl_fd, PIOCSTOP, &pi->prstatus) >= 0); @@ -1435,7 +1435,7 @@ proc_wait_for_stop (pi) #ifdef NEW_PROC_API { - int cmd = PCWSTOP; + long cmd = PCWSTOP; win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd)); /* We been runnin' and we stopped -- need to update status. */ pi->status_valid = 0; @@ -1512,7 +1512,7 @@ proc_run_process (pi, step, signo) #ifdef NEW_PROC_API { - int cmd[2]; + long cmd[2]; cmd[0] = PCRUN; cmd[1] = runflags; @@ -1558,7 +1558,7 @@ proc_set_traced_signals (pi, sigset) #ifdef NEW_PROC_API { struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char sigset[sizeof (sigset_t)]; } arg; @@ -1606,7 +1606,7 @@ proc_set_traced_faults (pi, fltset) #ifdef NEW_PROC_API { struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char fltset[sizeof (fltset_t)]; } arg; @@ -1652,7 +1652,7 @@ proc_set_traced_sysentry (pi, sysset) #ifdef NEW_PROC_API { struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char sysset[sizeof (sysset_t)]; } arg; @@ -1698,7 +1698,7 @@ proc_set_traced_sysexit (pi, sysset) #ifdef NEW_PROC_API { struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char sysset[sizeof (sysset_t)]; } arg; @@ -1744,7 +1744,7 @@ proc_set_held_signals (pi, sighold) #ifdef NEW_PROC_API { struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char hold[sizeof (sigset_t)]; } arg; @@ -2162,7 +2162,7 @@ proc_clear_current_fault (pi) #ifdef NEW_PROC_API { - int cmd = PCCFAULT; + long cmd = PCCFAULT; win = (write (pi->ctl_fd, (void *) &cmd, sizeof (cmd)) == sizeof (cmd)); } #else @@ -2192,7 +2192,7 @@ proc_set_current_signal (pi, signo) { int win; struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char sinfo[sizeof (struct siginfo)]; } arg; @@ -2262,7 +2262,7 @@ proc_clear_current_signal (pi) #ifdef NEW_PROC_API { struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char sinfo[sizeof (struct siginfo)]; } arg; @@ -2422,7 +2422,7 @@ proc_set_gregs (pi) { #ifdef NEW_PROC_API struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char gregs[sizeof (gdb_gregset_t)]; } arg; @@ -2466,7 +2466,7 @@ proc_set_fpregs (pi) { #ifdef NEW_PROC_API struct { - int cmd; + long cmd; /* Use char array to avoid alignment issues. */ char fpregs[sizeof (gdb_fpregset_t)]; } arg; @@ -2530,7 +2530,7 @@ proc_kill (pi, signo) else { #ifdef NEW_PROC_API - int cmd[2]; + long cmd[2]; cmd[0] = PCKILL; cmd[1] = signo; @@ -2594,7 +2594,7 @@ proc_set_watchpoint (pi, addr, len, wflags) return 0; #else struct { - int cmd; + long cmd; char watch[sizeof (prwatch_t)]; } arg; prwatch_t *pwatch; |