projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[GOLD] Fix powerpc64 optimization of TOC accesses
[deliverable/binutils-gdb.git]
/
gdb
/
i386-gnu-nat.c
diff --git
a/gdb/i386-gnu-nat.c
b/gdb/i386-gnu-nat.c
index c6c53ca508b11774a88f4af8bb151cc2fd0a78f0..07e3a8361c12fe3cf8cc6bbad2f32104740da071 100644
(file)
--- a/
gdb/i386-gnu-nat.c
+++ b/
gdb/i386-gnu-nat.c
@@
-1,6
+1,6
@@
/* Low level interface to i386 running the GNU Hurd.
/* Low level interface to i386 running the GNU Hurd.
- Copyright (C) 1992-201
6
Free Software Foundation, Inc.
+ Copyright (C) 1992-201
7
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-17,17
+17,21
@@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* Mach/Hurd headers are not yet ready for C++ compilation. */
+extern "C"
+{
+#include <mach.h>
+#include <mach_error.h>
+#include <mach/message.h>
+#include <mach/exception.h>
+}
+
#include "defs.h"
#include "x86-nat.h"
#include "inferior.h"
#include "floatformat.h"
#include "regcache.h"
#include "defs.h"
#include "x86-nat.h"
#include "inferior.h"
#include "floatformat.h"
#include "regcache.h"
-#include <mach.h>
-#include <mach_error.h>
-#include <mach/message.h>
-#include <mach/exception.h>
-
#include "i386-tdep.h"
#include "gnu-nat.h"
#include "i386-tdep.h"
#include "gnu-nat.h"
@@
-58,7
+62,7
@@
fetch_fpregs (struct regcache *regcache, struct proc *thread)
{
mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
struct i386_float_state state;
{
mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
struct i386_float_state state;
-
error
_t err;
+
kern_return
_t err;
err = thread_get_state (thread->port, i386_FLOAT_STATE,
(thread_state_t) &state, &count);
err = thread_get_state (thread->port, i386_FLOAT_STATE,
(thread_state_t) &state, &count);
@@
-87,15
+91,15
@@
gnu_fetch_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
{
struct proc *thread;
struct regcache *regcache, int regno)
{
struct proc *thread;
+ ptid_t ptid = regcache_get_ptid (regcache);
/* Make sure we know about new threads. */
inf_update_procs (gnu_current_inf);
/* Make sure we know about new threads. */
inf_update_procs (gnu_current_inf);
- thread = inf_tid_to_thread (gnu_current_inf,
- ptid_get_lwp (inferior_ptid));
+ thread = inf_tid_to_thread (gnu_current_inf, ptid_get_lwp (ptid));
if (!thread)
error (_("Can't fetch registers from thread %s: No such thread"),
if (!thread)
error (_("Can't fetch registers from thread %s: No such thread"),
- target_pid_to_str (
inferior_
ptid));
+ target_pid_to_str (ptid));
if (regno < I386_NUM_GREGS || regno == -1)
{
if (regno < I386_NUM_GREGS || regno == -1)
{
@@
-148,7
+152,7
@@
store_fpregs (const struct regcache *regcache, struct proc *thread, int regno)
{
mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
struct i386_float_state state;
{
mach_msg_type_number_t count = i386_FLOAT_STATE_COUNT;
struct i386_float_state state;
-
error
_t err;
+
kern_return
_t err;
err = thread_get_state (thread->port, i386_FLOAT_STATE,
(thread_state_t) &state, &count);
err = thread_get_state (thread->port, i386_FLOAT_STATE,
(thread_state_t) &state, &count);
@@
-180,15
+184,15
@@
gnu_store_registers (struct target_ops *ops,
{
struct proc *thread;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
{
struct proc *thread;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ ptid_t ptid = regcache_get_ptid (regcache);
/* Make sure we know about new threads. */
inf_update_procs (gnu_current_inf);
/* Make sure we know about new threads. */
inf_update_procs (gnu_current_inf);
- thread = inf_tid_to_thread (gnu_current_inf,
- ptid_get_lwp (inferior_ptid));
+ thread = inf_tid_to_thread (gnu_current_inf, ptid_get_lwp (ptid));
if (!thread)
error (_("Couldn't store registers into thread %s: No such thread"),
if (!thread)
error (_("Couldn't store registers into thread %s: No such thread"),
- target_pid_to_str (
inferior_
ptid));
+ target_pid_to_str (ptid));
if (regno < I386_NUM_GREGS || regno == -1)
{
if (regno < I386_NUM_GREGS || regno == -1)
{
@@
-279,7
+283,7
@@
static void
i386_gnu_dr_get (struct i386_debug_state *regs, struct proc *thread)
{
mach_msg_type_number_t count = i386_DEBUG_STATE_COUNT;
i386_gnu_dr_get (struct i386_debug_state *regs, struct proc *thread)
{
mach_msg_type_number_t count = i386_DEBUG_STATE_COUNT;
-
error
_t err;
+
kern_return
_t err;
err = thread_get_state (thread->port, i386_DEBUG_STATE,
(thread_state_t) regs, &count);
err = thread_get_state (thread->port, i386_DEBUG_STATE,
(thread_state_t) regs, &count);
@@
-293,7
+297,7
@@
i386_gnu_dr_get (struct i386_debug_state *regs, struct proc *thread)
static void
i386_gnu_dr_set (const struct i386_debug_state *regs, struct proc *thread)
{
static void
i386_gnu_dr_set (const struct i386_debug_state *regs, struct proc *thread)
{
-
error
_t err;
+
kern_return
_t err;
err = thread_set_state (thread->port, i386_DEBUG_STATE,
(thread_state_t) regs, i386_DEBUG_STATE_COUNT);
err = thread_set_state (thread->port, i386_DEBUG_STATE,
(thread_state_t) regs, i386_DEBUG_STATE_COUNT);
@@
-405,9
+409,6
@@
i386_gnu_dr_get_control (void)
}
#endif /* i386_DEBUG_STATE */
}
#endif /* i386_DEBUG_STATE */
-/* Provide a prototype to silence -Wmissing-prototypes. */
-extern initialize_file_ftype _initialize_i386gnu_nat;
-
void
_initialize_i386gnu_nat (void)
{
void
_initialize_i386gnu_nat (void)
{
This page took
0.024533 seconds
and
4
git commands to generate.