aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>1998-11-06 03:02:44 +0000
committerJim Wilson <wilson@tuliptree.org>1998-11-06 03:02:44 +0000
commite5fddd378d17291683922da7ab53d57d35c1e4ad (patch)
tree383622c88937d7a5648acf36ae7156a7c6004bc4 /gdb
parent47a214450370a0b132c9308ca0c4029d29a84dfa (diff)
downloadgdb-e5fddd378d17291683922da7ab53d57d35c1e4ad.zip
gdb-e5fddd378d17291683922da7ab53d57d35c1e4ad.tar.gz
gdb-e5fddd378d17291683922da7ab53d57d35c1e4ad.tar.bz2
Patches to fix linux-x-i960-vxworks5.0 build failure.
* remote-vx.c (net_read_registers, net_write_registers, vx_xver_memory, vx_resume, vx_attach, vx_detach, vx_kill): Change errno to errno_num. * vx-share/xdr_ptrace.c (xdr_ptrace_return): Likewise. * vx-share/xdr_ptrace.h (struct ptrace_return): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/remote-vx.c14
-rw-r--r--gdb/vx-share/xdr_ptrace.c2
-rw-r--r--gdb/vx-share/xdr_ptrace.h4
4 files changed, 18 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c5d2ad2..863c71e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+1998-11-05 Jim Wilson <wilson@cygnus.com>
+
+ * remote-vx.c (net_read_registers, net_write_registers, vx_xver_memory,
+ vx_resume, vx_attach, vx_detach, vx_kill): Change errno to errno_num.
+ * vx-share/xdr_ptrace.c (xdr_ptrace_return): Likewise.
+ * vx-share/xdr_ptrace.h (struct ptrace_return): Likewise.
+
Thu Nov 5 08:41:33 1998 Christopher Faylor <cgf@cygnus.com>
* top.c (gdb_readline): Allow CRLF line termination on systems
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index df34263..b9fe630 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -414,7 +414,7 @@ net_read_registers (reg_buf, len, procnum)
error (rpcerr);
if (ptrace_out.status == -1)
{
- errno = ptrace_out.errno;
+ errno = ptrace_out.errno_num;
sprintf (message, "reading %s registers", (procnum == PTRACE_GETREGS)
? "general-purpose"
: "floating-point");
@@ -460,7 +460,7 @@ net_write_registers (reg_buf, len, procnum)
error (rpcerr);
if (ptrace_out.status == -1)
{
- errno = ptrace_out.errno;
+ errno = ptrace_out.errno_num;
sprintf (message, "writing %s registers", (procnum == PTRACE_SETREGS)
? "general-purpose"
: "floating-point");
@@ -557,7 +557,7 @@ vx_xfer_memory (memaddr, myaddr, len, write, target)
code chosen by the target so that a later perror () will
say something meaningful. */
- errno = ptrace_out.errno;
+ errno = ptrace_out.errno_num;
}
}
@@ -629,7 +629,7 @@ vx_resume (pid, step, siggnal)
error (rpcerr);
if (ptrace_out.status == -1)
{
- errno = ptrace_out.errno;
+ errno = ptrace_out.errno_num;
perror_with_name ("Resuming remote process");
}
}
@@ -1244,7 +1244,7 @@ vx_attach (args, from_tty)
error (rpcerr);
if (ptrace_out.status == -1)
{
- errno = ptrace_out.errno;
+ errno = ptrace_out.errno_num;
perror_with_name ("Attaching remote process");
}
@@ -1296,7 +1296,7 @@ vx_detach (args, from_tty)
error (rpcerr);
if (ptrace_out.status == -1)
{
- errno = ptrace_out.errno;
+ errno = ptrace_out.errno_num;
perror_with_name ("Detaching VxWorks process");
}
@@ -1324,7 +1324,7 @@ vx_kill ()
warning (rpcerr);
else if (ptrace_out.status == -1)
{
- errno = ptrace_out.errno;
+ errno = ptrace_out.errno_num;
perror_with_name ("Killing VxWorks process");
}
diff --git a/gdb/vx-share/xdr_ptrace.c b/gdb/vx-share/xdr_ptrace.c
index 6c9c8a2..fff4324 100644
--- a/gdb/vx-share/xdr_ptrace.c
+++ b/gdb/vx-share/xdr_ptrace.c
@@ -109,7 +109,7 @@ bool_t xdr_ptrace_return(xdrs, objp)
{
if (! xdr_int(xdrs, &objp->status))
return(FALSE);
- if (! xdr_int(xdrs, &objp->errno))
+ if (! xdr_int(xdrs, &objp->errno_num))
return(FALSE);
if (! xdr_ptrace_info(xdrs, &objp->info))
return(FALSE);
diff --git a/gdb/vx-share/xdr_ptrace.h b/gdb/vx-share/xdr_ptrace.h
index 9b8a290..9b4eb2b 100644
--- a/gdb/vx-share/xdr_ptrace.h
+++ b/gdb/vx-share/xdr_ptrace.h
@@ -57,9 +57,11 @@ typedef struct rptrace Rptrace;
/*
* structure returned by server on all remote ptrace calls
*/
+/* This used to have a field called errno, but that fails on hosts which
+ define errno to be a macro, so it was changed to errno_num. */
struct ptrace_return {
int status;
- int errno;
+ int errno_num;
Ptrace_info info;
};
typedef struct ptrace_return Ptrace_return;