Update the return type of gdb_ptrace to be more flexible
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.
This commit is contained in:
parent
f7d4f0b1b9
commit
1ff700c202
5 changed files with 12 additions and 4 deletions
|
@ -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>
|
2020-03-20 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
* c-exp.y (lex_one_token): Fix assert.
|
* c-exp.y (lex_one_token): Fix assert.
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "amd64-bsd-nat.h"
|
#include "amd64-bsd-nat.h"
|
||||||
|
|
||||||
|
|
||||||
static int
|
static PTRACE_TYPE_RET
|
||||||
gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr,
|
gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr,
|
||||||
PTRACE_TYPE_ARG4 data)
|
PTRACE_TYPE_ARG4 data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "inf-ptrace.h"
|
#include "inf-ptrace.h"
|
||||||
|
|
||||||
|
|
||||||
static int
|
static PTRACE_TYPE_RET
|
||||||
gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr,
|
gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr,
|
||||||
PTRACE_TYPE_ARG4 data)
|
PTRACE_TYPE_ARG4 data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,7 +78,7 @@ typedef struct fp_status fpregset_t;
|
||||||
#define PTRACE_SETFPREGS PT_SETFPREGS
|
#define PTRACE_SETFPREGS PT_SETFPREGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
static PTRACE_TYPE_RET
|
||||||
gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr)
|
gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr)
|
||||||
{
|
{
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "inf-ptrace.h"
|
#include "inf-ptrace.h"
|
||||||
|
|
||||||
|
|
||||||
static int
|
static PTRACE_TYPE_RET
|
||||||
gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr)
|
gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG3 addr)
|
||||||
{
|
{
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue