v7debug.h (1057B)
1 // Copyright 2014 Brian Swetland <swetland@frotz.net> 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef _V7DEBUG_H_ 16 #define _V7DEBUG_H_ 17 18 #include "dap.h" 19 20 typedef struct V7DEBUG V7DEBUG; 21 22 V7DEBUG *debug_init(DAP *dap, u32 apnum, u32 base); 23 24 // attach and halt cpu 25 int debug_attach(V7DEBUG *debug); 26 27 // detach and resume cpu 28 int debug_detach(V7DEBUG *debug); 29 30 // only valid while attached 31 int debug_reg_rd(V7DEBUG *debug, unsigned n, u32 *val); 32 int debug_reg_wr(V7DEBUG *debug, unsigned n, u32 val); 33 34 int debug_reg_dump(V7DEBUG *debug); 35 36 #endif