Switch the license of all .c files to GPLv3.
[deliverable/binutils-gdb.git] / gdb / gdbserver / mem-break.h
1 /* Memory breakpoint interfaces for the remote server for GDB.
2 Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
3
4 Contributed by MontaVista Software.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21 #ifndef MEM_BREAK_H
22 #define MEM_BREAK_H
23
24 /* Breakpoints are opaque. */
25
26 /* Create a new breakpoint at WHERE, and call HANDLER when
27 it is hit. */
28
29 void set_breakpoint_at (CORE_ADDR where,
30 void (*handler) (CORE_ADDR));
31
32 /* Delete a breakpoint previously inserted at ADDR with
33 set_breakpoint_at. */
34
35 void delete_breakpoint_at (CORE_ADDR addr);
36
37 /* Create a reinsertion breakpoint at STOP_AT for the breakpoint
38 currently at STOP_PC (and temporarily remove the breakpoint at
39 STOP_PC). */
40
41 void reinsert_breakpoint_by_bp (CORE_ADDR stop_pc, CORE_ADDR stop_at);
42
43 /* Change the status of the breakpoint at WHERE to inserted. */
44
45 void reinsert_breakpoint (CORE_ADDR where);
46
47 /* Change the status of the breakpoint at WHERE to uninserted. */
48
49 void uninsert_breakpoint (CORE_ADDR where);
50
51 /* See if any breakpoint claims ownership of STOP_PC. Call the handler for
52 the breakpoint, if found. */
53
54 int check_breakpoints (CORE_ADDR stop_pc);
55
56 /* See if any breakpoints shadow the target memory area from MEM_ADDR
57 to MEM_ADDR + MEM_LEN. Update the data already read from the target
58 (in BUF) if necessary. */
59
60 void check_mem_read (CORE_ADDR mem_addr, unsigned char *buf, int mem_len);
61
62 /* See if any breakpoints shadow the target memory area from MEM_ADDR
63 to MEM_ADDR + MEM_LEN. Update the data to be written to the target
64 (in BUF) if necessary, as well as the original data for any breakpoints. */
65
66 void check_mem_write (CORE_ADDR mem_addr, unsigned char *buf, int mem_len);
67
68 /* Set the byte pattern to insert for memory breakpoints. This function
69 must be called before any breakpoints are set. */
70
71 void set_breakpoint_data (const unsigned char *bp_data, int bp_len);
72
73 /* Delete all breakpoints. */
74
75 void delete_all_breakpoints (void);
76
77 #endif /* MEM_BREAK_H */
This page took 0.032204 seconds and 4 git commands to generate.