1 /* 2 * Copyright 2014, General Dynamics C4 Systems 3 * 4 * SPDX-License-Identifier: GPL-2.0-only 5 */ 6 7 #pragma once 8 9 #ifdef CONFIG_DEBUG_BUILD 10 11 /* helpers */ 12 void add_to_seen(cap_t c); 13 void reset_seen_list(void); 14 bool_t seen(cap_t c); 15 bool_t same_cap(cap_t a, cap_t b); 16 bool_t root_or_idle_tcb(tcb_t *tcb); 17 word_t get_tcb_sp(tcb_t *tcb); 18 19 /* common */ 20 void debug_capDL(void); 21 22 #endif /* CONFIG_DEBUG_BUILD */ 23 24 #if defined(CONFIG_DEBUG_BUILD) && defined(CONFIG_PRINTING) 25 26 void obj_tcb_print_cnodes(cap_t cnode, tcb_t *tcb); 27 void print_caps(void); 28 void print_objects(void); 29 void print_cap(cap_t cap); 30 void print_object(cap_t cap); 31 32 void obj_tcb_print_attrs(tcb_t *tcb); 33 void obj_sc_print_attrs(cap_t sc); 34 void obj_cnode_print_attrs(cap_t cnode); 35 void obj_ut_print_attrs(cte_t *slot, tcb_t *tcb); 36 37 void obj_tcb_print_slots(tcb_t *tcb); 38 void obj_cnode_print_slots(tcb_t *tcb); 39 void obj_irq_print_slots(cap_t irq_cap); 40 void obj_irq_print_maps(void); 41 42 void cap_ep_print_attrs(cap_t ep); 43 void cap_ntfn_print_attrs(cap_t ntfn); 44 void cap_cnode_print_attrs(cap_t cnode); 45 46 /* arch specific functions */ 47 void print_ipc_buffer_slot(tcb_t *tcb); 48 /* TBD: currently the capDL extractor declaring an object for every entry in the vspace. 49 * However, frames can be mapped into multiple locations but sould only be declared once. 50 */ 51 void obj_vtable_print_slots(tcb_t *tcb); 52 53 void print_cap_arch(cap_t cap); 54 void print_object_arch(cap_t cap); 55 void obj_tcb_print_vtable(tcb_t *tcb); 56 57 #endif /* defined(CONFIG_DEBUG_BUILD) && defined(CONFIG_PRINTING) */ 58