Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gdb/dist/gdb Add some precautions for platform...
details: https://anonhg.NetBSD.org/src/rev/fefa9920bbdb
branches: trunk
changeset: 979115:fefa9920bbdb
user: rin <rin%NetBSD.org@localhost>
date: Mon Dec 14 02:05:07 2020 +0000
description:
Add some precautions for platforms without PT_STEP support.
"nat/gdb_ptrace.h" defines PT_STEP as 9, if it is not defined. nat-ptrace.c
depends on this; inf_ptrace_target::resume() uses PT_STEP unconditionally
when its ``step'' argument is non-zero. Therefore,
- Add comment that nbsd-nat.c should include <sys/ptrace.h> directly,
instead of "nat/gdb_ptrace.h".
- Add gdb_assert(step == 0) in nbsd_nat_target::resume() ifndef PT_STEP,
before calling inf_ptrace_target::resume().
diffstat:
external/gpl3/gdb/dist/gdb/nbsd-nat.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r 2e48dbce5e50 -r fefa9920bbdb external/gpl3/gdb/dist/gdb/nbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/nbsd-nat.c Mon Dec 14 02:01:03 2020 +0000
+++ b/external/gpl3/gdb/dist/gdb/nbsd-nat.c Mon Dec 14 02:05:07 2020 +0000
@@ -27,6 +27,9 @@
#include "gdbarch.h"
#include <sys/types.h>
+/* Use <sys/ptrace.h> directly, instead of "nat/gdb_ptrace.h". Otherwise,
+ PT_STEP will be defined unintentionally, which breaks platforms without
+ PT_STEP support. */
#include <sys/ptrace.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
@@ -539,6 +542,7 @@
nbsd_resume (this, ptid_t (inf->pid, 0, 0), step, signal);
}
#else
+ gdb_assert(step == 0);
if (ptid.pid () == -1)
ptid = inferior_ptid;
inf_ptrace_target::resume (ptid, step, signal);
Home |
Main Index |
Thread Index |
Old Index