198944Sobrien/* Native-dependent definitions for FreeBSD/i386. 2130803Smarcel 3130803Smarcel Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1997, 2000, 2001, 2004 498944Sobrien Free Software Foundation, Inc. 519370Spst 698944Sobrien This file is part of GDB. 719370Spst 898944Sobrien This program is free software; you can redistribute it and/or modify 998944Sobrien it under the terms of the GNU General Public License as published by 1098944Sobrien the Free Software Foundation; either version 2 of the License, or 1198944Sobrien (at your option) any later version. 1219370Spst 1398944Sobrien This program is distributed in the hope that it will be useful, 1498944Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1598944Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1698944Sobrien GNU General Public License for more details. 1719370Spst 1898944Sobrien You should have received a copy of the GNU General Public License 1998944Sobrien along with this program; if not, write to the Free Software 2098944Sobrien Foundation, Inc., 59 Temple Place - Suite 330, 2198944Sobrien Boston, MA 02111-1307, USA. */ 2219370Spst 2398944Sobrien#ifndef NM_FBSD_H 2498944Sobrien#define NM_FBSD_H 2519370Spst 2698944Sobrien#ifdef HAVE_PT_GETDBREGS 2798944Sobrien#define I386_USE_GENERIC_WATCHPOINTS 2898944Sobrien#endif 2919370Spst 3098944Sobrien#include "i386/nm-i386.h" 3198944Sobrien 32104990Smp#ifdef HAVE_SYS_PARAM_H 33104990Smp#include <sys/param.h> 34104990Smp#endif 35104990Smp 3698944Sobrien/* Provide access to the i386 hardware debugging registers. */ 3798944Sobrien 3898944Sobrien#define I386_DR_LOW_SET_CONTROL(control) \ 3998944Sobrien i386bsd_dr_set_control (control) 4098944Sobrienextern void i386bsd_dr_set_control (unsigned long control); 4198944Sobrien 4298944Sobrien#define I386_DR_LOW_SET_ADDR(regnum, addr) \ 4398944Sobrien i386bsd_dr_set_addr (regnum, addr) 4498944Sobrienextern void i386bsd_dr_set_addr (int regnum, CORE_ADDR addr); 4598944Sobrien 4698944Sobrien#define I386_DR_LOW_RESET_ADDR(regnum) \ 4798944Sobrien i386bsd_dr_reset_addr (regnum) 4898944Sobrienextern void i386bsd_dr_reset_addr (int regnum); 4998944Sobrien 5098944Sobrien#define I386_DR_LOW_GET_STATUS() \ 5198944Sobrien i386bsd_dr_get_status () 5298944Sobrienextern unsigned long i386bsd_dr_get_status (void); 5398944Sobrien 5498944Sobrien 5598944Sobrien/* Type of the third argument to the `ptrace' system call. */ 5698944Sobrien#define PTRACE_ARG3_TYPE caddr_t 5798944Sobrien 5898944Sobrien/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */ 5998944Sobrien#define FETCH_INFERIOR_REGISTERS 6098944Sobrien 6198944Sobrien/* Override child_resume in `infptrace.c' to work around a kernel bug. */ 6298944Sobrien#define CHILD_RESUME 6398944Sobrien 64130803Smarcel/* Override child_pid_to_exec_file in 'inftarg.c'. */ 65130803Smarcel#define CHILD_PID_TO_EXEC_FILE 66130803Smarcel 6798944Sobrien/* We can attach and detach. */ 6898944Sobrien#define ATTACH_DETACH 6998944Sobrien 7098944Sobrien 7198944Sobrien/* Support for the user struct. */ 7298944Sobrien 7398944Sobrien/* Return the size of the user struct. */ 7498944Sobrien 7598944Sobrien#define KERNEL_U_SIZE kernel_u_size () 7698944Sobrienextern int kernel_u_size (void); 7798944Sobrien 7819370Spst/* This is the amount to subtract from u.u_ar0 7919370Spst to get the offset in the core file of the register values. */ 8019370Spst 8119370Spst#include <machine/vmparam.h> 8219370Spst#define KERNEL_U_ADDR USRSTACK 8319370Spst 8419370Spst#define REGISTER_U_ADDR(addr, blockend, regno) \ 8598944Sobrien (addr) = register_u_addr ((blockend), (regno)) 8698944Sobrienextern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regno); 8798944Sobrien 8819370Spst 8998944Sobrien/* Shared library support. */ 9019370Spst 91130803Smarcel#include "solib.h" 9219370Spst 93130803Smarcel/* Make structure definitions match up with those expected in 94130803Smarcel `solib-sunos.c'. */ 9598944Sobrien 9619370Spst#define link_object sod 9719370Spst#define lo_name sod_name 9819370Spst#define lo_library sod_library 9919370Spst#define lo_unused sod_reserved 10019370Spst#define lo_major sod_major 10119370Spst#define lo_minor sod_minor 10219370Spst#define lo_next sod_next 10319370Spst 10419370Spst#define link_map so_map 10519370Spst#define lm_addr som_addr 10619370Spst#define lm_name som_path 10719370Spst#define lm_next som_next 10819370Spst#define lm_lop som_sod 10919370Spst#define lm_lob som_sodbase 11019370Spst#define lm_rwt som_write 11119370Spst#define lm_ld som_dynamic 11219370Spst#define lm_lpd som_spd 11319370Spst 11419370Spst#define link_dynamic_2 section_dispatch_table 11519370Spst#define ld_loaded sdt_loaded 11619370Spst#define ld_need sdt_sods 11719370Spst#define ld_rules sdt_filler1 11819370Spst#define ld_got sdt_got 11919370Spst#define ld_plt sdt_plt 12019370Spst#define ld_rel sdt_rel 12119370Spst#define ld_hash sdt_hash 12219370Spst#define ld_stab sdt_nzlist 12319370Spst#define ld_stab_hash sdt_filler2 12419370Spst#define ld_buckets sdt_buckets 12519370Spst#define ld_symbols sdt_strings 12619370Spst#define ld_symb_size sdt_str_sz 12719370Spst#define ld_text sdt_text_sz 12819370Spst#define ld_plt_sz sdt_plt_sz 12919370Spst 13019370Spst#define rtc_symb rt_symbol 13119370Spst#define rtc_sp rt_sp 13219370Spst#define rtc_next rt_next 13319370Spst 13419370Spst#define ld_debug so_debug 13519370Spst#define ldd_version dd_version 13619370Spst#define ldd_in_debugger dd_in_debugger 13719370Spst#define ldd_sym_loaded dd_sym_loaded 13819370Spst#define ldd_bp_addr dd_bpt_addr 13919370Spst#define ldd_bp_inst dd_bpt_shadow 14019370Spst#define ldd_cp dd_cc 14119370Spst 14219370Spst#define link_dynamic _dynamic 14319370Spst#define ld_version d_version 14419370Spst#define ldd d_debug 14519370Spst#define ld_un d_un 14619370Spst#define ld_2 d_sdt 14719370Spst 148130803Smarcel#endif /* nm-fbsd.h */ 149