Initial revision
[ssr] / StraySrc / Hammer / sh / brkpt
1 ;
2 ; brkpt.sh
3 ;
4 ; Breakpoint handling
5 ;
6 ; © 1994-1998 Straylight
7 ;
8
9 ;----- Licensing note -------------------------------------------------------
10 ;
11 ; This file is part of Straylight's Sledgehammer debugger.
12 ;
13 ; Sledgehammer is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
16 ; any later version.
17 ;
18 ; Sledgehammer is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sledgehammer. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 ;----- Overview -------------------------------------------------------------
28 ;
29 ; Functions provided:
30 ;
31 ; brkpt_set
32 ; brkpt_hardBreak
33 ; brkpt_translate
34 ; brkpt_remove
35 ; brkpt_remAll
36 ; brkpt_exist
37
38 ; --- brkpt_set ---
39 ;
40 ; On entry: R0 == address to set breakpoint
41 ;
42 ; On exit: May return error
43 ;
44 ; Use: Sets a breakpoint at the given location, giving it the
45 ; current handle. The address is assumed to be word-aligned,
46 ; and writable.
47
48 IMPORT brkpt_set
49
50 ; --- brkpt_hardBreak ---
51 ;
52 ; On entry: [R13+4] == return address to stomp on
53 ;
54 ; On exit: --
55 ;
56 ; Use: Sets an immediate break specified by a SWI call.
57
58 IMPORT brkpt_hardBreak
59
60 ; --- brkpt_translate ---
61 ;
62 ; On entry: R0 == address to translate
63 ;
64 ; On exit: R0 == the address we are really interested in
65 ;
66 ; Use: Returns the address given, as if there was no breakpoint
67 ; there.
68
69 IMPORT brkpt_translate
70
71 ; --- brkpt_remove ---
72 ;
73 ; On entry: R0 == address of breakpoint
74 ;
75 ; On exit: --
76 ;
77 ; Use: Removes the break point (if any) at the given address
78
79 IMPORT brkpt_remove
80
81 ; --- brkpt_remAll ---
82 ;
83 ; On entry: --
84 ;
85 ; On exit: --
86 ;
87 ; Use: Removes all the breakpoints currently installed.
88
89 IMPORT brkpt_remAll
90
91 ; --- brkpt_exist ---
92 ;
93 ; On entry: R0 == address to test for
94 ;
95 ; On exit: CC if there is no breakpoint here
96 ; CS otherwise
97 ;
98 ; Use: Informs the user if there is a breakpint at the address
99 ; passed.
100
101 IMPORT brkpt_exist
102
103 ;----- That's all, folks ----------------------------------------------------
104
105 END