Update the return type of gdb_ptrace to be more flexible
authorKamil Rytarowski <n54@gmx.com>
Fri, 20 Mar 2020 14:37:18 +0000 (15:37 +0100)
committerKamil Rytarowski <n54@gmx.com>
Fri, 20 Mar 2020 14:51:16 +0000 (15:51 +0100)
Linux returns long from ptrace(2) and BSDs int.

gdb/ChangeLog:

       * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
       `PTRACE_TYPE_RET'.
       * i386-bsd-nat.c (gdb_ptrace): Likewise.
       * sparc-nat.c (gdb_ptrace): Likewise.
       * x86-bsd-nat.c (gdb_ptrace): Likewise.

gdb/ChangeLog
gdb/amd64-bsd-nat.c
gdb/i386-bsd-nat.c
gdb/sparc-nat.c
gdb/x86-bsd-nat.c

index 1be14b15d185db272902ab985b27707651a7b0ef..650b74bae4ad3f752153da14e1b0f2dd2c2d178e 100644 (file)
@@ -1,3 +1,11 @@
+2020-03-20  Kamil Rytarowski  <n54@gmx.com>
+
+       * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
+       `PTRACE_TYPE_RET'.
+       * i386-bsd-nat.c (gdb_ptrace): Likewise.
+       * sparc-nat.c (gdb_ptrace): Likewise.
+       * x86-bsd-nat.c (gdb_ptrace): Likewise.
+
 2020-03-20  Tom Tromey  <tromey@adacore.com>
 
        * c-exp.y (lex_one_token): Fix assert.
index 1ff044ff470bd59449b0ae46a951102c90492c89..04322c70378751900bc8145013a76d3bf96ce915 100644 (file)
@@ -36,7 +36,7 @@
 #include "amd64-bsd-nat.h"
 \f
 
-static int
+static PTRACE_TYPE_RET
 gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr,
            PTRACE_TYPE_ARG4 data)
 {
index 3250dab737fec2fd394c530e48912ebe2e98f07a..4e8693246c87088881afd5a361c5803d2743116d 100644 (file)
@@ -34,7 +34,7 @@
 #include "inf-ptrace.h"
 \f
 
-static int
+static PTRACE_TYPE_RET
 gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr,
            PTRACE_TYPE_ARG4 data)
 {
index fadcfd344740013494abc64deed314ef8bebcf64..8d5bf350bdbb30a8ee03a423067f2f84678c5b32 100644 (file)
@@ -78,7 +78,7 @@ typedef struct fp_status fpregset_t;
 #define PTRACE_SETFPREGS PT_SETFPREGS
 #endif
 
-static int
+static PTRACE_TYPE_RET
 gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr)
 {
 #ifdef __NetBSD__
index 9e2bea1e0208638b3453e1191bb1f540bb075114..e2ebf5f2e5049b9d191988eac17b879b154011b3 100644 (file)
@@ -33,7 +33,7 @@
 #include "inf-ptrace.h"
 \f
 
-static int
+static PTRACE_TYPE_RET
 gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr)
 {
 #ifdef __NetBSD__
This page took 0.032505 seconds and 4 git commands to generate.