]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbcore.h
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / gdb / gdbcore.h
CommitLineData
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
4This file is part of GDB.
5
6GDB is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
10
11GDB is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GDB; see the file COPYING. If not, write to
18the 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. */
27char *get_exec_file ();
28
29/* Nonzero if there is a core file. */
30int 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. */
36int read_memory_nobpt ();
37
38/* Report a memory error with error(). */
39
40void memory_error ();
41
42/* Like target_read_memory, but report an error if can't read. */
43void read_memory ();
44
45/* Read an integer from debugged memory, given address and number of bytes. */
46long read_memory_integer ();
47
e1ce8aa5
JK
48void write_memory (
49#ifdef __STDC__
50 CORE_ADDR, char *, int
51#endif
52 );
53
bd5635a1
RP
54/* Hook for `exec_file_command' command to call. */
55
56extern void (*exec_file_display_hook) ();
57
58/* Binary File Diddlers for the exec and core files */
59extern bfd *core_bfd;
60extern bfd *exec_bfd;
61
62void core_file_command ();
63void exec_file_command ();
64void validate_files ();
65unsigned int register_addr ();
66int xfer_core_file ();
67void fetch_core_registers ();
68void registers_fetched ();
69
70#if !defined (KERNEL_U_ADDR)
71extern 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
79struct 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
88int build_section_table ();