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