mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
1777feb0fe
* h8300-tdep.c: Comment cleanup, mostly periods and spaces. * hppa-hpux-tdep.c: Ditto. * hppa-linux-nat.c: Ditto. * hppa-linux-tdep.c: Ditto. * hppanbsd-tdep.c: Ditto. * hppa-tdep.c: Ditto. * hppa-tdep.h: Ditto. * hpux-thread.c: Ditto. * i386-cygwin-tdep.c: Ditto. * i386-darwin-nat.c: Ditto. * i386gnu-nat.c: Ditto. * i386-linux-nat.c: Ditto. * i386-linux-tdep.c: Ditto. * i386-nat.c: Ditto. * i386-nat.h: Ditto. * i386nbsd-tdep.c: Ditto. * i386-sol2-nat.c: Ditto. * i386-stub.c: Ditto. * i386-tdep.c: Ditto. * i386-tdep.h: Ditto. * i387-tdep.c: Ditto. * ia64-linux-nat.c: Ditto. * ia64-linux-tdep.c: Ditto. * ia64-tdep.c: Ditto. * infcall.c: Ditto. * infcall.h: Ditto. * infcmd.c: Ditto. * inferior.c: Ditto. * inferior.h: Ditto. * infloop.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * interps.c: Ditto. * interps.h: Ditto. * iq2000-tdep.c: Ditto. * irix5-nat.c: Ditto. * jit.c: Ditto. * jit.h: Ditto. * jv-exp.y: Ditto. * jv-lang.c: Ditto. * jv-lang.h: Ditto. * jv-typeprint.c: Ditto. * jv-valprint.c: Ditto. * language.c: Ditto. * language.h: Ditto. * linespec.c: Ditto. * linux-fork.c: Ditto. * linux-nat.c: Ditto. * linux-thread-db.c: Ditto. * lm32-tdep.c: Ditto.
93 lines
3.2 KiB
C
93 lines
3.2 KiB
C
/* Native-dependent code for the i386.
|
|
|
|
Low level functions to implement Oeprating System specific
|
|
code to manipulate I386 debug registers.
|
|
|
|
Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#include "defs.h"
|
|
|
|
#ifndef I386_NAT_H
|
|
#define I386_NAT_H 1
|
|
|
|
/* Hardware-assisted breakpoints and watchpoints. */
|
|
|
|
/* Add watchpoint methods to the provided target_ops.
|
|
Targets using i386 family debug registers for watchpoints should call
|
|
this. */
|
|
struct target_ops;
|
|
extern void i386_use_watchpoints (struct target_ops *);
|
|
|
|
/* Support for hardware watchpoints and breakpoints using the i386
|
|
debug registers.
|
|
|
|
This provides several functions for inserting and removing
|
|
hardware-assisted breakpoints and watchpoints, testing if one or
|
|
more of the watchpoints triggered and at what address, checking
|
|
whether a given region can be watched, etc.
|
|
|
|
In addition, each target should provide several low-level functions
|
|
regrouped into i386_dr_low_type struct below. These functions
|
|
that will be called to insert watchpoints and hardware breakpoints
|
|
into the inferior, remove them, and check their status. These
|
|
functions are:
|
|
|
|
set_control -- set the debug control (DR7)
|
|
register to a given value for all LWPs
|
|
|
|
set_addr -- put an address into one debug
|
|
register for all LWPs
|
|
|
|
reset_addr -- reset the address stored in
|
|
one debug register for all LWPs
|
|
|
|
get_status -- return the value of the debug
|
|
status (DR6) register for current LWP
|
|
|
|
unset_status -- unset the specified bits of the debug
|
|
status (DR6) register for all LWPs
|
|
|
|
Additionally, the native file should set the debug_register_length
|
|
field to 4 or 8 depending on the number of bytes used for
|
|
deubg registers. */
|
|
|
|
struct i386_dr_low_type
|
|
{
|
|
void (*set_control) (unsigned long);
|
|
void (*set_addr) (int, CORE_ADDR);
|
|
void (*reset_addr) (int);
|
|
unsigned long (*get_status) (void);
|
|
void (*unset_status) (unsigned long);
|
|
int debug_register_length;
|
|
};
|
|
|
|
extern struct i386_dr_low_type i386_dr_low;
|
|
|
|
/* Use this function to set i386_dr_low debug_register_length field
|
|
rather than setting it directly to check that the length is only
|
|
set once. It also enables the 'maint set/show show-debug-regs'
|
|
command. */
|
|
|
|
extern void i386_set_debug_register_length (int len);
|
|
|
|
/* Use this function to reset the i386-nat.c debug register state. */
|
|
|
|
extern void i386_cleanup_dregs (void);
|
|
|
|
#endif /* I386_NAT_H */
|