1 /* 2 * PearPC 3 * tracers.h 4 * 5 * Copyright (C) 2003 Sebastian Biallas (sb@biallas.net) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as 9 * published by the Free Software Foundation. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 20 21 #ifndef __TRACERS_H__ 22 #define __TRACERS_H__ 23 24 #include "system/types.h" 25 #include "tools/snprintf.h" 26 27 extern void uae_ppc_crash(void); 28 29 #define PPC_CPU_TRACE(msg, ...) ht_printf("[CPU/CPU] " msg, ##__VA_ARGS__) 30 #define PPC_ALU_TRACE(msg, ...) ht_printf("[CPU/ALU] " msg, ##__VA_ARGS__) 31 #define PPC_FPU_TRACE(msg, ...) ht_printf("[CPU/FPU] " msg, ##__VA_ARGS__) 32 #define PPC_DEC_TRACE(msg, ...) ht_printf("[CPU/DEC] " msg, ##__VA_ARGS__) 33 #define PPC_ESC_TRACE(msg, ...) ht_printf("[CPU/ESC] " msg, ##__VA_ARGS__) 34 //#define PPC_EXC_TRACE(msg, ...) ht_printf("[CPU/EXC] " msg, ##__VA_ARGS__) 35 #define PPC_MMU_TRACE(msg, ...) ht_printf("[CPU/MMU] " msg, ##__VA_ARGS__) 36 #define PPC_OPC_TRACE(msg, ...) ht_printf("[CPU/OPC] " msg, ##__VA_ARGS__) 37 //#define IO_PROM_TRACE(msg, ...) ht_printf("[IO/PROM] " msg, ##__VA_ARGS__) 38 //#define IO_PROM_FS_TRACE(msg, ...) ht_printf("[IO/PROM/FS] " msg, ##__VA_ARGS__) 39 //#define IO_3C90X_TRACE(msg, ...) ht_printf("[IO/3c90x] " msg, ##__VA_ARGS__) 40 //#define IO_RTL8139_TRACE(msg, ...) ht_printf("[IO/rtl8139] " msg, ##__VA_ARGS__) 41 //#define IO_GRAPHIC_TRACE(msg, ...) ht_printf("[IO/GCARD] " msg, ##__VA_ARGS__) 42 //#define IO_CUDA_TRACE(msg, ...) ht_printf("[IO/CUDA] " msg, ##__VA_ARGS__) 43 //#define IO_PIC_TRACE(msg, ...) ht_printf("[IO/PIC] " msg, ##__VA_ARGS__) 44 //#define IO_PCI_TRACE(msg, ...) ht_printf("[IO/PCI] " msg, ##__VA_ARGS__) 45 //#define IO_MACIO_TRACE(msg, ...) ht_printf("[IO/MACIO] " msg, ##__VA_ARGS__) 46 //#define IO_NVRAM_TRACE(msg, ...) ht_printf("[IO/NVRAM] " msg, ##__VA_ARGS__) 47 //#define IO_IDE_TRACE(msg, ...) ht_printf("[IO/IDE] " msg, ##__VA_ARGS__) 48 //#define IO_USB_TRACE(msg, ...) ht_printf("[IO/USB] " msg, ##__VA_ARGS__) 49 #define IO_SERIAL_TRACE(msg, ...) ht_printf("[IO/SERIAL] " msg, ##__VA_ARGS__) 50 #define IO_CORE_TRACE(msg, ...) ht_printf("[IO/Generic] " msg, ##__VA_ARGS__) 51 52 #define PPC_CPU_WARN(msg, ...) ht_printf("[CPU/CPU] <Warning> " msg, ##__VA_ARGS__) 53 #define PPC_ALU_WARN(msg, ...) ht_printf("[CPU/ALU] <Warning> " msg, ##__VA_ARGS__) 54 #define PPC_FPU_WARN(msg, ...) ht_printf("[CPU/FPU] <Warning> " msg, ##__VA_ARGS__) 55 #define PPC_DEC_WARN(msg, ...) ht_printf("[CPU/DEC] <Warning> " msg, ##__VA_ARGS__) 56 #define PPC_ESC_WARN(msg, ...) ht_printf("[CPU/ESC] <Warning> " msg, ##__VA_ARGS__) 57 #define PPC_EXC_WARN(msg, ...) ht_printf("[CPU/EXC] <Warning> " msg, ##__VA_ARGS__) 58 #define PPC_MMU_WARN(msg, ...) ht_printf("[CPU/MMU] <Warning> " msg, ##__VA_ARGS__) 59 #define PPC_OPC_WARN(msg, ...) ht_printf("[CPU/OPC] <Warning> " msg, ##__VA_ARGS__) 60 #define IO_PROM_WARN(msg, ...) ht_printf("[IO/PROM] <Warning> " msg, ##__VA_ARGS__) 61 #define IO_PROM_FS_WARN(msg, ...) ht_printf("[IO/PROM/FS] <Warning> " msg, ##__VA_ARGS__) 62 #define IO_3C90X_WARN(msg, ...) ht_printf("[IO/3c90x] <Warning> " msg, ##__VA_ARGS__) 63 #define IO_RTL8139_WARN(msg, ...) ht_printf("[IO/rtl8139] <Warning> " msg, ##__VA_ARGS__) 64 #define IO_GRAPHIC_WARN(msg, ...) ht_printf("[IO/GCARD] <Warning> " msg, ##__VA_ARGS__) 65 #define IO_CUDA_WARN(msg, ...) ht_printf("[IO/CUDA] <Warning> " msg, ##__VA_ARGS__) 66 #define IO_PIC_WARN(msg, ...) ht_printf("[IO/PIC] <Warning> " msg, ##__VA_ARGS__) 67 #define IO_PCI_WARN(msg, ...) ht_printf("[IO/PCI] <Warning> " msg, ##__VA_ARGS__) 68 #define IO_MACIO_WARN(msg, ...) ht_printf("[IO/MACIO] <Warning> " msg, ##__VA_ARGS__) 69 #define IO_NVRAM_WARN(msg, ...) ht_printf("[IO/NVRAM] <Warning> " msg, ##__VA_ARGS__) 70 #define IO_IDE_WARN(msg, ...) ht_printf("[IO/IDE] <Warning> " msg, ##__VA_ARGS__) 71 #define IO_USB_WARN(msg, ...) ht_printf("[IO/USB] <Warning> " msg, ##__VA_ARGS__) 72 #define IO_SERIAL_WARN(msg, ...) ht_printf("[IO/SERIAL] <Warning> " msg, ##__VA_ARGS__) 73 #define IO_CORE_WARN(msg, ...) ht_printf("[IO/Generic] <Warning> " msg, ##__VA_ARGS__) 74 75 #define PPC_CPU_ERR(msg, ...) {ht_printf("[CPU/CPU] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 76 #define PPC_ALU_ERR(msg, ...) {ht_printf("[CPU/ALU] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 77 #define PPC_FPU_ERR(msg, ...) {ht_printf("[CPU/FPU] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 78 #define PPC_DEC_ERR(msg, ...) {ht_printf("[CPU/DEC] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 79 #define PPC_ESC_ERR(msg, ...) {ht_printf("[CPU/ESC] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 80 #define PPC_EXC_ERR(msg, ...) {ht_printf("[CPU/EXC] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 81 #define PPC_MMU_ERR(msg, ...) {ht_printf("[CPU/MMU] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 82 #define PPC_OPC_ERR(msg, ...) {ht_printf("[CPU/OPC] <Error> " msg, ##__VA_ARGS__); } 83 #define IO_PROM_ERR(msg, ...) {ht_printf("[IO/PROM] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 84 #define IO_PROM_FS_ERR(msg, ...) {ht_printf("[IO/PROM/FS] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 85 #define IO_3C90X_ERR(msg, ...) {ht_printf("[IO/3c90x] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 86 #define IO_RTL8139_ERR(msg, ...) {ht_printf("[IO/rtl8139] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 87 #define IO_GRAPHIC_ERR(msg, ...) {ht_printf("[IO/GCARD] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 88 #define IO_CUDA_ERR(msg, ...) {ht_printf("[IO/CUDA] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 89 #define IO_PIC_ERR(msg, ...) {ht_printf("[IO/PIC] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 90 #define IO_PCI_ERR(msg, ...) {ht_printf("[IO/PCI] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 91 #define IO_MACIO_ERR(msg, ...) {ht_printf("[IO/MACIO] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 92 #define IO_NVRAM_ERR(msg, ...) {ht_printf("[IO/NVRAM] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 93 #define IO_IDE_ERR(msg, ...) {ht_printf("[IO/IDE] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 94 #define IO_USB_ERR(msg, ...) {ht_printf("[IO/IDE] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 95 #define IO_SERIAL_ERR(msg, ...) {ht_printf("[IO/SERIAL] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 96 #define IO_CORE_ERR(msg, ...) {ht_printf("[IO/Generic] <Error> " msg, ##__VA_ARGS__); uae_ppc_crash(); } 97 98 /* 99 * 100 */ 101 #ifndef PPC_CPU_TRACE 102 #define PPC_CPU_TRACE(msg, ...) 103 #endif 104 105 #ifndef PPC_ALU_TRACE 106 #define PPC_ALU_TRACE(msg, ...) 107 #endif 108 109 #ifndef PPC_FPU_TRACE 110 #define PPC_FPU_TRACE(msg, ...) 111 #endif 112 113 #ifndef PPC_DEC_TRACE 114 #define PPC_DEC_TRACE(msg, ...) 115 #endif 116 117 #ifndef PPC_EXC_TRACE 118 #define PPC_EXC_TRACE(msg, ...) 119 #endif 120 121 #ifndef PPC_ESC_TRACE 122 #define PPC_ESC_TRACE(msg, ...) 123 #endif 124 125 #ifndef PPC_MMU_TRACE 126 #define PPC_MMU_TRACE(msg, ...) 127 #endif 128 129 #ifndef PPC_OPC_TRACE 130 #define PPC_OPC_TRACE(msg, ...) 131 #endif 132 133 #ifndef PPC_OPC_WARN 134 #define PPC_OPC_WARN(msg, ...) 135 #endif 136 137 #ifndef IO_PROM_TRACE 138 #define IO_PROM_TRACE(msg, ...) 139 #endif 140 141 #ifndef IO_PROM_FS_TRACE 142 #define IO_PROM_FS_TRACE(msg, ...) 143 #endif 144 145 #ifndef IO_GRAPHIC_TRACE 146 #define IO_GRAPHIC_TRACE(msg, ...) 147 #endif 148 149 #ifndef IO_CUDA_TRACE 150 #define IO_CUDA_TRACE(msg, ...) 151 #endif 152 153 #ifndef IO_PIC_TRACE 154 #define IO_PIC_TRACE(msg, ...) 155 #endif 156 157 #ifndef IO_PCI_TRACE 158 #define IO_PCI_TRACE(msg, ...) 159 #endif 160 161 #ifndef IO_MACIO_TRACE 162 #define IO_MACIO_TRACE(msg, ...) 163 #endif 164 165 #ifndef IO_ISA_TRACE 166 #define IO_ISA_TRACE(msg, ...) 167 #endif 168 169 #ifndef IO_IDE_TRACE 170 #define IO_IDE_TRACE(msg, ...) 171 #endif 172 173 #ifndef IO_CORE_TRACE 174 #define IO_CORE_TRACE(msg, ...) 175 #endif 176 177 #ifndef IO_NVRAM_TRACE 178 #define IO_NVRAM_TRACE(msg, ...) 179 #endif 180 181 #ifndef IO_USB_TRACE 182 #define IO_USB_TRACE(msg, ...) 183 #endif 184 185 #ifndef IO_SERIAL_TRACE 186 #define IO_SERIAL_TRACE(msg, ...) 187 #endif 188 189 #ifndef IO_3C90X_TRACE 190 #define IO_3C90X_TRACE(msg, ...) 191 #endif 192 193 #ifndef IO_RTL8139_TRACE 194 #define IO_RTL8139_TRACE(msg, ...) 195 #endif 196 197 #endif 198 199