diff options
author | Pedro Alves <palves@redhat.com> | 2018-06-04 12:26:39 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2018-06-04 12:26:39 +0100 |
commit | 59f413d5412217c5c6f9e25d0279a1997426d60a (patch) | |
tree | 43c6f18700c57acb3c33f348ce22533ada6a33a6 /gdb/utils.c | |
parent | 1332a1400145b5cca04c4d1ea77e0191d8dc5727 (diff) | |
download | gdb-59f413d5412217c5c6f9e25d0279a1997426d60a.zip gdb-59f413d5412217c5c6f9e25d0279a1997426d60a.tar.gz gdb-59f413d5412217c5c6f9e25d0279a1997426d60a.tar.bz2 |
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 f6ac5f3d63e0 ("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.
Diffstat (limited to 'gdb/utils.c')
0 files changed, 0 insertions, 0 deletions