Skip to content
Commit 59f413d5 authored by Pedro Alves's avatar Pedro Alves
Browse files

Fix macOS null pointer dereference

<https://sourceware.org/bugzilla/show_bug.cgi?id=22960#c4> reports
that macOS gdb crashes with a null pointer dereference in
push_target(struct target_ops *).  This commit fixes that.

The problem is that commit f6ac5f3d ("Convert struct target_ops to
C++") left the darwin_ops global uninitialized.

We don't need that global anymore, we can use the (new)
get_native_target function instead for the same effect.

gdb/ChangeLog:
2018-06-04  Pedro Alves  <palves@redhat.com>

	* darwin-nat.c (darwin_ops): Delete.
	(darwin_attach_pid): Use get_native_target.
parent 1332a140
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment