Commit | Line | Data |
---|---|---|
bd5635a1 RP |
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 | /* Hook for `exec_file_command' command to call. */ | |
49 | ||
50 | extern void (*exec_file_display_hook) (); | |
51 | ||
52 | /* Binary File Diddlers for the exec and core files */ | |
53 | extern bfd *core_bfd; | |
54 | extern bfd *exec_bfd; | |
55 | ||
56 | void core_file_command (); | |
57 | void exec_file_command (); | |
58 | void validate_files (); | |
59 | unsigned int register_addr (); | |
60 | int xfer_core_file (); | |
61 | void fetch_core_registers (); | |
62 | void registers_fetched (); | |
63 | ||
64 | #if !defined (KERNEL_U_ADDR) | |
65 | extern CORE_ADDR kernel_u_addr; | |
66 | #define KERNEL_U_ADDR kernel_u_addr | |
67 | #endif | |
68 | ||
69 | /* Struct section_table maps address ranges to file sections. It is | |
70 | mostly used with BFD files, but can be used without (e.g. for handling | |
71 | raw disks, or files not in formats handled by BFD). */ | |
72 | ||
73 | struct section_table { | |
74 | CORE_ADDR addr; /* Lowest address in section */ | |
75 | CORE_ADDR endaddr; /* 1+highest address in section */ | |
76 | sec_ptr sec_ptr; /* BFD section pointer */ | |
77 | }; | |
78 | ||
79 | /* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR. | |
80 | Returns 0 if OK, 1 on error. */ | |
81 | ||
82 | int build_section_table (); |