Release 940201
[wine/gsoc-2012-control.git] / debugger / gdbcore.h
blobe9c8466be3e91f60e041f760a816c8b0b33780af
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)
23 #define GDBCORE_H 1
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. */
31 extern char *
32 get_exec_file PARAMS ((int err));
34 /* Nonzero if there is a core file. */
36 extern int
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. */
44 extern int
45 read_memory_nobpt PARAMS ((CORE_ADDR memaddr, char *myaddr, unsigned len));
47 /* Report a memory error with error(). */
49 extern void
50 memory_error PARAMS ((int status, CORE_ADDR memaddr));
52 /* Like target_read_memory, but report an error if can't read. */
54 extern void
55 read_memory PARAMS ((CORE_ADDR memaddr, char *myaddr, int len));
57 /* Read an integer from debugged memory, given address and number of bytes. */
59 extern long
60 read_memory_integer PARAMS ((CORE_ADDR memaddr, int len));
62 /* If this is prototyped, need to deal with void* vs. char*. */
64 extern void
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));
71 extern void
72 specify_exec_file_hook PARAMS ((void (*hook) (char *filename)));
74 /* Binary File Diddlers for the exec and core files */
75 extern bfd *core_bfd;
76 extern bfd *exec_bfd;
78 /* Whether to open exec and core files read-only or read-write. */
80 extern int write_files;
82 extern void
83 core_file_command PARAMS ((char *filename, int from_tty));
85 extern void
86 exec_file_command PARAMS ((char *filename, int from_tty));
88 extern void
89 validate_files PARAMS ((void));
91 extern unsigned int
92 register_addr PARAMS ((int regno, int blockend));
94 extern int
95 xfer_core_file PARAMS ((CORE_ADDR memaddr, char *myaddr, int len));
97 extern void
98 fetch_core_registers PARAMS ((char *core_reg_sect, unsigned core_reg_size,
99 int which, unsigned int reg_addr));
101 extern void
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
107 #endif
109 /* The target vector for core files */
110 extern struct target_ops core_ops;
112 /* target vector functions called directly from elsewhere */
113 void
114 core_open PARAMS ((char *, int));
116 void
117 core_detach PARAMS ((char *, int));
119 #endif /* !defined (GDBCORE_H) */