1 /* Machine independent variables that describe the core file under GDB.
2 Copyright 1986, 1987, 1989, 1990, 1992 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* Interface routines for core, executable, etc. */
22 #if !defined (GDBCORE_H)
25 #include "bfd.h" /* Binary File Description */
27 /* Return the name of the executable file as a string.
28 ERR nonzero means get error if there is none specified;
29 otherwise return 0 in that case. */
32 get_exec_file
PARAMS ((int err
));
34 /* Nonzero if there is a core file. */
37 have_core_file_p
PARAMS ((void));
39 /* Read "memory data" from whatever target or inferior we have.
40 Returns zero if successful, errno value if not. EIO is used
41 for address out of bounds. If breakpoints are inserted, returns
42 shadow contents, not the breakpoints themselves. From breakpoint.c. */
45 read_memory_nobpt
PARAMS ((CORE_ADDR memaddr
, char *myaddr
, unsigned len
));
47 /* Report a memory error with error(). */
50 memory_error
PARAMS ((int status
, CORE_ADDR memaddr
));
52 /* Like target_read_memory, but report an error if can't read. */
55 read_memory
PARAMS ((CORE_ADDR memaddr
, char *myaddr
, int len
));
57 /* Read an integer from debugged memory, given address and number of bytes. */
60 read_memory_integer
PARAMS ((CORE_ADDR memaddr
, int len
));
62 /* If this is prototyped, need to deal with void* vs. char*. */
65 write_memory
PARAMS ((CORE_ADDR memaddr
, char *myaddr
, int len
));
67 /* Hook for `exec_file_command' command to call. */
69 extern void (*exec_file_display_hook
) PARAMS ((char *filename
));
72 specify_exec_file_hook
PARAMS ((void (*hook
) (char *filename
)));
74 /* Binary File Diddlers for the exec and core files */
78 /* Whether to open exec and core files read-only or read-write. */
80 extern int write_files
;
83 core_file_command
PARAMS ((char *filename
, int from_tty
));
86 exec_file_command
PARAMS ((char *filename
, int from_tty
));
89 validate_files
PARAMS ((void));
92 register_addr
PARAMS ((int regno
, int blockend
));
95 xfer_core_file
PARAMS ((CORE_ADDR memaddr
, char *myaddr
, int len
));
98 fetch_core_registers
PARAMS ((char *core_reg_sect
, unsigned core_reg_size
,
99 int which
, unsigned int reg_addr
));
102 registers_fetched
PARAMS ((void));
104 #if !defined (KERNEL_U_ADDR)
105 extern CORE_ADDR kernel_u_addr
;
106 #define KERNEL_U_ADDR kernel_u_addr
109 /* The target vector for core files */
110 extern struct target_ops core_ops
;
112 /* target vector functions called directly from elsewhere */
114 core_open
PARAMS ((char *, int));
117 core_detach
PARAMS ((char *, int));
119 #endif /* !defined (GDBCORE_H) */