Based on patches from H.J. Lu <hjl@nynexst.com>:
[deliverable/binutils-gdb.git] / gdb / gdbcore.h
1 /* Machine independent variables that describe the core file under GDB.
2 Copyright (C) 1986, 1987, 1989, 1990 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
6 GDB 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 1, or (at your option)
9 any later version.
10
11 GDB 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.
15
16 You should have received a copy of the GNU General Public License
17 along with GDB; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20 /* Interface routines for core, executable, etc. */
21
22 #include "bfd.h" /* Binary File Description */
23
24 /* Return the name of the executable file as a string.
25 ERR nonzero means get error if there is none specified;
26 otherwise return 0 in that case. */
27 char *get_exec_file ();
28
29 /* Nonzero if there is a core file. */
30 int have_core_file_p ();
31
32 /* Read "memory data" from whatever target or inferior we have.
33 Returns zero if successful, errno value if not. EIO is used
34 for address out of bounds. If breakpoints are inserted, returns
35 shadow contents, not the breakpoints themselves. From breakpoint.c. */
36 int read_memory_nobpt ();
37
38 /* Report a memory error with error(). */
39
40 void memory_error ();
41
42 /* Like target_read_memory, but report an error if can't read. */
43 void read_memory ();
44
45 /* Read an integer from debugged memory, given address and number of bytes. */
46 long read_memory_integer ();
47
48 void write_memory (
49 #ifdef __STDC__
50 CORE_ADDR, char *, int
51 #endif
52 );
53
54 /* Hook for `exec_file_command' command to call. */
55
56 extern void (*exec_file_display_hook) ();
57
58 /* Binary File Diddlers for the exec and core files */
59 extern bfd *core_bfd;
60 extern bfd *exec_bfd;
61
62 void core_file_command ();
63 void exec_file_command ();
64 void validate_files ();
65 unsigned int register_addr ();
66 int xfer_core_file ();
67 void fetch_core_registers ();
68 void registers_fetched ();
69
70 #if !defined (KERNEL_U_ADDR)
71 extern CORE_ADDR kernel_u_addr;
72 #define KERNEL_U_ADDR kernel_u_addr
73 #endif
74
75 /* Struct section_table maps address ranges to file sections. It is
76 mostly used with BFD files, but can be used without (e.g. for handling
77 raw disks, or files not in formats handled by BFD). */
78
79 struct section_table {
80 CORE_ADDR addr; /* Lowest address in section */
81 CORE_ADDR endaddr; /* 1+highest address in section */
82 sec_ptr sec_ptr; /* BFD section pointer */
83 };
84
85 /* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
86 Returns 0 if OK, 1 on error. */
87
88 int build_section_table ();
This page took 0.032771 seconds and 4 git commands to generate.