From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/3] A few fixes to OpenBSD's native target
Date: Mon, 26 Jul 2021 17:24:18 -0700 [thread overview]
Message-ID: <20210727002421.18947-1-jhb@FreeBSD.org> (raw)
The first patch is an alternative fix for the issue Simon ran into
with OpenBSD trying to use the x86 debug registers when it doesn't
support their use by a debugger.
The second patch pacifies a compiler warning due to the lack of debug
register support.
The third patch fixes an issue where an existing process tripped an
assertion where find_inferior_pid was called with a pid of 0
(unfortunately stack traces don't work for OpenBSD core dumps, so I
couldn't easily tell where hte failure was). However, the use of
inferior_ptid is not correct anymore in ::wait methods and fixing that
alone allows a process to exit cleanly without error.
This is enough to get a single threaded program to run and exit
cleanly (which is all I tested). There are likely other issues in the
OpenBSD target, but this at least gets it working for the simple case
again.
John Baldwin (3):
Don't compile x86 debug register support on OpenBSD.
x86-bsd-nat: Only define gdb_ptrace when using debug registers.
obsd-nat: Various fixes to obsd_nat_target::wait.
gdb/configure.nat | 5 ++--
gdb/obsd-nat.c | 61 ++++++++++-------------------------------------
gdb/x86-bsd-nat.c | 16 ++++++-------
gdb/x86-bsd-nat.h | 9 +++++--
4 files changed, 30 insertions(+), 61 deletions(-)
--
2.31.1
next reply other threads:[~2021-07-27 0:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 0:24 John Baldwin [this message]
2021-07-27 0:24 ` [PATCH 1/3] Don't compile x86 debug register support on OpenBSD John Baldwin
2021-07-27 1:19 ` Simon Marchi via Gdb-patches
2021-07-27 0:24 ` [PATCH 2/3] x86-bsd-nat: Only define gdb_ptrace when using debug registers John Baldwin
2021-07-27 1:20 ` Simon Marchi via Gdb-patches
2021-07-27 0:24 ` [PATCH 3/3] obsd-nat: Various fixes to obsd_nat_target::wait John Baldwin
2021-07-27 1:54 ` Simon Marchi via Gdb-patches
2021-07-27 16:03 ` John Baldwin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210727002421.18947-1-jhb@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox