Revision 001faf32
b/block-raw-posix.c | ||
---|---|---|
73 | 73 |
|
74 | 74 |
//#define DEBUG_BLOCK |
75 | 75 |
#if defined(DEBUG_BLOCK) |
76 |
#define DEBUG_BLOCK_PRINT(formatCstr, args...) do { if (qemu_log_enabled()) \
|
|
77 |
{ qemu_log(formatCstr, ##args); qemu_log_flush(); } } while (0)
|
|
76 |
#define DEBUG_BLOCK_PRINT(formatCstr, ...) do { if (qemu_log_enabled()) \
|
|
77 |
{ qemu_log(formatCstr, ## __VA_ARGS__); qemu_log_flush(); } } while (0)
|
|
78 | 78 |
#else |
79 |
#define DEBUG_BLOCK_PRINT(formatCstr, args...)
|
|
79 |
#define DEBUG_BLOCK_PRINT(formatCstr, ...) |
|
80 | 80 |
#endif |
81 | 81 |
|
82 | 82 |
/* OS X does not have O_DSYNC */ |
b/darwin-user/main.c | ||
---|---|---|
158 | 158 |
return -1; |
159 | 159 |
} |
160 | 160 |
|
161 |
#define EXCP_DUMP(env, fmt, args...) \
|
|
162 |
do { \
|
|
163 |
fprintf(stderr, fmt , ##args); \
|
|
164 |
cpu_dump_state(env, stderr, fprintf, 0); \
|
|
165 |
qemu_log(fmt, ##args); \
|
|
166 |
log_cpu_state(env, 0); \
|
|
161 |
#define EXCP_DUMP(env, fmt, ...) \
|
|
162 |
do { \ |
|
163 |
fprintf(stderr, fmt , ## __VA_ARGS__); \
|
|
164 |
cpu_dump_state(env, stderr, fprintf, 0); \ |
|
165 |
qemu_log(fmt, ## __VA_ARGS__); \
|
|
166 |
log_cpu_state(env, 0); \ |
|
167 | 167 |
} while (0) |
168 | 168 |
|
169 | 169 |
void cpu_loop(CPUPPCState *env) |
b/darwin-user/syscall.c | ||
---|---|---|
627 | 627 |
tswap16s(&w->ws_ypixel); |
628 | 628 |
} |
629 | 629 |
|
630 |
#define STRUCT(name, list...) STRUCT_ ## name,
|
|
630 |
#define STRUCT(name, ...) STRUCT_ ## name, |
|
631 | 631 |
#define STRUCT_SPECIAL(name) STRUCT_ ## name, |
632 | 632 |
enum { |
633 | 633 |
#include "ioctls_types.h" |
... | ... | |
635 | 635 |
#undef STRUCT |
636 | 636 |
#undef STRUCT_SPECIAL |
637 | 637 |
|
638 |
#define STRUCT(name, list...) const argtype struct_ ## name ## _def[] = { list, TYPE_NULL };
|
|
638 |
#define STRUCT(name, ...) const argtype struct_ ## name ## _def[] = { __VA_ARGS__, TYPE_NULL };
|
|
639 | 639 |
#define STRUCT_SPECIAL(name) |
640 | 640 |
#include "ioctls_types.h" |
641 | 641 |
#undef STRUCT |
... | ... | |
656 | 656 |
#define MAX_STRUCT_SIZE 4096 |
657 | 657 |
|
658 | 658 |
static IOCTLEntry ioctl_entries[] = { |
659 |
#define IOCTL(cmd, access, types...) \
|
|
660 |
{ cmd, cmd, #cmd, access, { types } },
|
|
659 |
#define IOCTL(cmd, access, ...) \
|
|
660 |
{ cmd, cmd, #cmd, access, { __VA_ARGS__ } },
|
|
661 | 661 |
#include "ioctls.h" |
662 | 662 |
{ 0, 0, }, |
663 | 663 |
}; |
... | ... | |
898 | 898 |
#define WRAPPER_CALL_DIRECT_6(function, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6) long __qemu_##function(void *cpu_env) { int i = 0; typeof(_arg1) arg1 = _arg1; typeof(_arg2) arg2 = _arg2; typeof(_arg3) arg3 = _arg3; typeof(_arg4) arg4 = _arg4; typeof(_arg5) arg5 = _arg5; typeof(_arg6) arg6 = _arg6; return (long)function(arg1, arg2, arg3, arg4, arg5, arg6); } |
899 | 899 |
#define WRAPPER_CALL_DIRECT_7(function, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7) long __qemu_##function(void *cpu_env) { int i = 0; typeof(_arg1) arg1 = _arg1; typeof(_arg2) arg2 = _arg2; typeof(_arg3) arg3 = _arg3; typeof(_arg4) arg4 = _arg4; typeof(_arg5) arg5 = _arg5; typeof(_arg6) arg6 = _arg6; typeof(_arg7) arg7 = _arg7; return (long)function(arg1, arg2, arg3, arg4, arg5, arg6, arg7); } |
900 | 900 |
#define WRAPPER_CALL_DIRECT_8(function, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8) long __qemu_##function(void *cpu_env) { int i = 0; typeof(_arg1) arg1 = _arg1; typeof(_arg2) arg2 = _arg2; typeof(_arg3) arg3 = _arg3; typeof(_arg4) arg4 = _arg4; typeof(_arg5) arg5 = _arg5; typeof(_arg6) arg6 = _arg6; typeof(_arg7) arg7 = _arg7; typeof(_arg8) arg8 = _arg8; return (long)function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); } |
901 |
#define WRAPPER_CALL_DIRECT(function, nargs, args...) WRAPPER_CALL_DIRECT_##nargs(function, args)
|
|
902 |
#define WRAPPER_CALL_NOERRNO(function, nargs, args...) WRAPPER_CALL_DIRECT(function, nargs, args)
|
|
903 |
#define WRAPPER_CALL_INDIRECT(function, nargs, args...)
|
|
904 |
#define ENTRY(name, number, function, nargs, call_type, args...) WRAPPER_##call_type(function, nargs, args)
|
|
901 |
#define WRAPPER_CALL_DIRECT(function, nargs, ...) WRAPPER_CALL_DIRECT_##nargs(function, __VA_ARGS__)
|
|
902 |
#define WRAPPER_CALL_NOERRNO(function, nargs, ...) WRAPPER_CALL_DIRECT(function, nargs, __VA_ARGS__)
|
|
903 |
#define WRAPPER_CALL_INDIRECT(function, nargs, ...) |
|
904 |
#define ENTRY(name, number, function, nargs, call_type, ...) WRAPPER_##call_type(function, nargs, __VA_ARGS__)
|
|
905 | 905 |
|
906 | 906 |
#include "syscalls.h" |
907 | 907 |
|
... | ... | |
926 | 926 |
#define ENTRY_CALL_DIRECT(name, number, function, nargs, call_type) _ENTRY(name, number, __qemu_##function, nargs, call_type) |
927 | 927 |
#define ENTRY_CALL_NOERRNO(name, number, function, nargs, call_type) ENTRY_CALL_DIRECT(name, number, function, nargs, call_type) |
928 | 928 |
#define ENTRY_CALL_INDIRECT(name, number, function, nargs, call_type) _ENTRY(name, number, function, nargs, call_type) |
929 |
#define ENTRY(name, number, function, nargs, call_type, args...) ENTRY_##call_type(name, number, function, nargs, call_type)
|
|
929 |
#define ENTRY(name, number, function, nargs, call_type, ...) ENTRY_##call_type(name, number, function, nargs, call_type) |
|
930 | 930 |
|
931 | 931 |
#define CALL_DIRECT 1 |
932 | 932 |
#define CALL_INDIRECT 2 |
b/hw/adb.c | ||
---|---|---|
29 | 29 |
//#define DEBUG_ADB |
30 | 30 |
|
31 | 31 |
#ifdef DEBUG_ADB |
32 |
#define ADB_DPRINTF(fmt, args...) \
|
|
33 |
do { printf("ADB: " fmt , ##args); } while (0)
|
|
32 |
#define ADB_DPRINTF(fmt, ...) \ |
|
33 |
do { printf("ADB: " fmt , ## __VA_ARGS__); } while (0)
|
|
34 | 34 |
#else |
35 |
#define ADB_DPRINTF(fmt, args...)
|
|
35 |
#define ADB_DPRINTF(fmt, ...) |
|
36 | 36 |
#endif |
37 | 37 |
|
38 | 38 |
/* ADB commands */ |
b/hw/apb_pci.c | ||
---|---|---|
33 | 33 |
//#define DEBUG_APB |
34 | 34 |
|
35 | 35 |
#ifdef DEBUG_APB |
36 |
#define APB_DPRINTF(fmt, args...) \
|
|
37 |
do { printf("APB: " fmt , ##args); } while (0)
|
|
36 |
#define APB_DPRINTF(fmt, ...) \ |
|
37 |
do { printf("APB: " fmt , ## __VA_ARGS__); } while (0)
|
|
38 | 38 |
#else |
39 |
#define APB_DPRINTF(fmt, args...)
|
|
39 |
#define APB_DPRINTF(fmt, ...) |
|
40 | 40 |
#endif |
41 | 41 |
|
42 | 42 |
typedef target_phys_addr_t pci_addr_t; |
b/hw/arm_gic.c | ||
---|---|---|
14 | 14 |
//#define DEBUG_GIC |
15 | 15 |
|
16 | 16 |
#ifdef DEBUG_GIC |
17 |
#define DPRINTF(fmt, args...) \
|
|
18 |
do { printf("arm_gic: " fmt , ##args); } while (0)
|
|
17 |
#define DPRINTF(fmt, ...) \ |
|
18 |
do { printf("arm_gic: " fmt , ## __VA_ARGS__); } while (0)
|
|
19 | 19 |
#else |
20 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
20 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
21 | 21 |
#endif |
22 | 22 |
|
23 | 23 |
#ifdef NVIC |
b/hw/cs4231.c | ||
---|---|---|
46 | 46 |
#define CS_CDC_VER 0x8a |
47 | 47 |
|
48 | 48 |
#ifdef DEBUG_CS |
49 |
#define DPRINTF(fmt, args...) \
|
|
50 |
do { printf("CS: " fmt , ##args); } while (0)
|
|
49 |
#define DPRINTF(fmt, ...) \
|
|
50 |
do { printf("CS: " fmt , ## __VA_ARGS__); } while (0)
|
|
51 | 51 |
#else |
52 |
#define DPRINTF(fmt, args...)
|
|
52 |
#define DPRINTF(fmt, ...) |
|
53 | 53 |
#endif |
54 | 54 |
|
55 | 55 |
static void cs_reset(void *opaque) |
b/hw/cuda.c | ||
---|---|---|
36 | 36 |
//#define DEBUG_CUDA_PACKET |
37 | 37 |
|
38 | 38 |
#ifdef DEBUG_CUDA |
39 |
#define CUDA_DPRINTF(fmt, args...) \
|
|
40 |
do { printf("CUDA: " fmt , ##args); } while (0)
|
|
39 |
#define CUDA_DPRINTF(fmt, ...) \
|
|
40 |
do { printf("CUDA: " fmt , ## __VA_ARGS__); } while (0)
|
|
41 | 41 |
#else |
42 |
#define CUDA_DPRINTF(fmt, args...)
|
|
42 |
#define CUDA_DPRINTF(fmt, ...) |
|
43 | 43 |
#endif |
44 | 44 |
|
45 | 45 |
/* Bits in B data register: all active low */ |
b/hw/dp8393x.c | ||
---|---|---|
34 | 34 |
#endif |
35 | 35 |
|
36 | 36 |
#ifdef DEBUG_SONIC |
37 |
#define DPRINTF(fmt, args...) \
|
|
38 |
do { printf("sonic: " fmt , ##args); } while (0)
|
|
37 |
#define DPRINTF(fmt, ...) \ |
|
38 |
do { printf("sonic: " fmt , ## __VA_ARGS__); } while (0)
|
|
39 | 39 |
static const char* reg_names[] = { |
40 | 40 |
"CR", "DCR", "RCR", "TCR", "IMR", "ISR", "UTDA", "CTDA", |
41 | 41 |
"TPS", "TFC", "TSA0", "TSA1", "TFS", "URDA", "CRDA", "CRBA0", |
... | ... | |
46 | 46 |
"0x30", "0x31", "0x32", "0x33", "0x34", "0x35", "0x36", "0x37", |
47 | 47 |
"0x38", "0x39", "0x3a", "0x3b", "0x3c", "0x3d", "0x3e", "DCR2" }; |
48 | 48 |
#else |
49 |
#define DPRINTF(fmt, args...) do {} while (0)
|
|
49 |
#define DPRINTF(fmt, ...) do {} while (0) |
|
50 | 50 |
#endif |
51 | 51 |
|
52 |
#define SONIC_ERROR(fmt, args...) \
|
|
53 |
do { printf("sonic ERROR: %s: " fmt, __func__ , ##args); } while (0)
|
|
52 |
#define SONIC_ERROR(fmt, ...) \ |
|
53 |
do { printf("sonic ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)
|
|
54 | 54 |
|
55 | 55 |
#define SONIC_CR 0x00 |
56 | 56 |
#define SONIC_DCR 0x01 |
b/hw/eccmemctl.c | ||
---|---|---|
28 | 28 |
//#define DEBUG_ECC |
29 | 29 |
|
30 | 30 |
#ifdef DEBUG_ECC |
31 |
#define DPRINTF(fmt, args...) \
|
|
32 |
do { printf("ECC: " fmt , ##args); } while (0)
|
|
31 |
#define DPRINTF(fmt, ...) \
|
|
32 |
do { printf("ECC: " fmt , ## __VA_ARGS__); } while (0)
|
|
33 | 33 |
#else |
34 |
#define DPRINTF(fmt, args...)
|
|
34 |
#define DPRINTF(fmt, ...) |
|
35 | 35 |
#endif |
36 | 36 |
|
37 | 37 |
/* There are 3 versions of this chip used in SMP sun4m systems: |
b/hw/eepro100.c | ||
---|---|---|
60 | 60 |
//~ #define DEBUG_EEPRO100 |
61 | 61 |
|
62 | 62 |
#ifdef DEBUG_EEPRO100 |
63 |
#define logout(fmt, args...) fprintf(stderr, "EE100\t%-24s" fmt, __func__, ##args)
|
|
63 |
#define logout(fmt, ...) fprintf(stderr, "EE100\t%-24s" fmt, __func__, ## __VA_ARGS__)
|
|
64 | 64 |
#else |
65 |
#define logout(fmt, args...) ((void)0)
|
|
65 |
#define logout(fmt, ...) ((void)0) |
|
66 | 66 |
#endif |
67 | 67 |
|
68 | 68 |
/* Set flags to 0 to disable debug output. */ |
b/hw/eeprom93xx.c | ||
---|---|---|
44 | 44 |
//~ #define DEBUG_EEPROM |
45 | 45 |
|
46 | 46 |
#ifdef DEBUG_EEPROM |
47 |
#define logout(fmt, args...) fprintf(stderr, "EEPROM\t%-24s" fmt, __func__, ##args)
|
|
47 |
#define logout(fmt, ...) fprintf(stderr, "EEPROM\t%-24s" fmt, __func__, ## __VA_ARGS__)
|
|
48 | 48 |
#else |
49 |
#define logout(fmt, args...) ((void)0)
|
|
49 |
#define logout(fmt, ...) ((void)0) |
|
50 | 50 |
#endif |
51 | 51 |
|
52 | 52 |
#define EEPROM_INSTANCE 0 |
b/hw/escc.c | ||
---|---|---|
62 | 62 |
*/ |
63 | 63 |
|
64 | 64 |
#ifdef DEBUG_SERIAL |
65 |
#define SER_DPRINTF(fmt, args...) \
|
|
66 |
do { printf("SER: " fmt , ##args); } while (0)
|
|
65 |
#define SER_DPRINTF(fmt, ...) \
|
|
66 |
do { printf("SER: " fmt , ## __VA_ARGS__); } while (0)
|
|
67 | 67 |
#else |
68 |
#define SER_DPRINTF(fmt, args...)
|
|
68 |
#define SER_DPRINTF(fmt, ...) |
|
69 | 69 |
#endif |
70 | 70 |
#ifdef DEBUG_KBD |
71 |
#define KBD_DPRINTF(fmt, args...) \
|
|
72 |
do { printf("KBD: " fmt , ##args); } while (0)
|
|
71 |
#define KBD_DPRINTF(fmt, ...) \
|
|
72 |
do { printf("KBD: " fmt , ## __VA_ARGS__); } while (0)
|
|
73 | 73 |
#else |
74 |
#define KBD_DPRINTF(fmt, args...)
|
|
74 |
#define KBD_DPRINTF(fmt, ...) |
|
75 | 75 |
#endif |
76 | 76 |
#ifdef DEBUG_MOUSE |
77 |
#define MS_DPRINTF(fmt, args...) \
|
|
78 |
do { printf("MSC: " fmt , ##args); } while (0)
|
|
77 |
#define MS_DPRINTF(fmt, ...) \
|
|
78 |
do { printf("MSC: " fmt , ## __VA_ARGS__); } while (0)
|
|
79 | 79 |
#else |
80 |
#define MS_DPRINTF(fmt, args...)
|
|
80 |
#define MS_DPRINTF(fmt, ...) |
|
81 | 81 |
#endif |
82 | 82 |
|
83 | 83 |
typedef enum { |
b/hw/esp.c | ||
---|---|---|
38 | 38 |
*/ |
39 | 39 |
|
40 | 40 |
#ifdef DEBUG_ESP |
41 |
#define DPRINTF(fmt, args...) \
|
|
42 |
do { printf("ESP: " fmt , ##args); } while (0)
|
|
41 |
#define DPRINTF(fmt, ...) \
|
|
42 |
do { printf("ESP: " fmt , ## __VA_ARGS__); } while (0)
|
|
43 | 43 |
#else |
44 |
#define DPRINTF(fmt, args...) do {} while (0)
|
|
44 |
#define DPRINTF(fmt, ...) do {} while (0) |
|
45 | 45 |
#endif |
46 | 46 |
|
47 |
#define ESP_ERROR(fmt, args...) \
|
|
48 |
do { printf("ESP ERROR: %s: " fmt, __func__ , ##args); } while (0)
|
|
47 |
#define ESP_ERROR(fmt, ...) \
|
|
48 |
do { printf("ESP ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)
|
|
49 | 49 |
|
50 | 50 |
#define ESP_REGS 16 |
51 | 51 |
#define TI_BUFSZ 16 |
b/hw/fdc.c | ||
---|---|---|
37 | 37 |
//#define DEBUG_FLOPPY |
38 | 38 |
|
39 | 39 |
#ifdef DEBUG_FLOPPY |
40 |
#define FLOPPY_DPRINTF(fmt, args...) \
|
|
41 |
do { printf("FLOPPY: " fmt , ##args); } while (0)
|
|
40 |
#define FLOPPY_DPRINTF(fmt, ...) \
|
|
41 |
do { printf("FLOPPY: " fmt , ## __VA_ARGS__); } while (0)
|
|
42 | 42 |
#else |
43 |
#define FLOPPY_DPRINTF(fmt, args...)
|
|
43 |
#define FLOPPY_DPRINTF(fmt, ...) |
|
44 | 44 |
#endif |
45 | 45 |
|
46 |
#define FLOPPY_ERROR(fmt, args...) \
|
|
47 |
do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ##args); } while (0)
|
|
46 |
#define FLOPPY_ERROR(fmt, ...) \
|
|
47 |
do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)
|
|
48 | 48 |
|
49 | 49 |
/********************************************************/ |
50 | 50 |
/* Floppy drive emulation */ |
b/hw/fw_cfg.c | ||
---|---|---|
30 | 30 |
//#define DEBUG_FW_CFG |
31 | 31 |
|
32 | 32 |
#ifdef DEBUG_FW_CFG |
33 |
#define FW_CFG_DPRINTF(fmt, args...) \
|
|
34 |
do { printf("FW_CFG: " fmt , ##args); } while (0)
|
|
33 |
#define FW_CFG_DPRINTF(fmt, ...) \
|
|
34 |
do { printf("FW_CFG: " fmt , ## __VA_ARGS__); } while (0)
|
|
35 | 35 |
#else |
36 |
#define FW_CFG_DPRINTF(fmt, args...)
|
|
36 |
#define FW_CFG_DPRINTF(fmt, ...) |
|
37 | 37 |
#endif |
38 | 38 |
|
39 | 39 |
#define FW_CFG_SIZE 2 |
b/hw/g364fb.c | ||
---|---|---|
26 | 26 |
//#define DEBUG_G364 |
27 | 27 |
|
28 | 28 |
#ifdef DEBUG_G364 |
29 |
#define DPRINTF(fmt, args...) \
|
|
30 |
do { printf("g364: " fmt , ##args); } while (0)
|
|
29 |
#define DPRINTF(fmt, ...) \ |
|
30 |
do { printf("g364: " fmt , ## __VA_ARGS__); } while (0)
|
|
31 | 31 |
#else |
32 |
#define DPRINTF(fmt, args...) do {} while (0)
|
|
32 |
#define DPRINTF(fmt, ...) do {} while (0) |
|
33 | 33 |
#endif |
34 |
#define BADF(fmt, args...) \
|
|
35 |
do { fprintf(stderr, "g364 ERROR: " fmt , ##args);} while (0)
|
|
34 |
#define BADF(fmt, ...) \ |
|
35 |
do { fprintf(stderr, "g364 ERROR: " fmt , ## __VA_ARGS__);} while (0)
|
|
36 | 36 |
|
37 | 37 |
typedef struct G364State { |
38 | 38 |
/* hardware */ |
b/hw/grackle_pci.c | ||
---|---|---|
31 | 31 |
//#define DEBUG_GRACKLE |
32 | 32 |
|
33 | 33 |
#ifdef DEBUG_GRACKLE |
34 |
#define GRACKLE_DPRINTF(fmt, args...) \
|
|
35 |
do { printf("GRACKLE: " fmt , ##args); } while (0)
|
|
34 |
#define GRACKLE_DPRINTF(fmt, ...) \
|
|
35 |
do { printf("GRACKLE: " fmt , ## __VA_ARGS__); } while (0)
|
|
36 | 36 |
#else |
37 |
#define GRACKLE_DPRINTF(fmt, args...)
|
|
37 |
#define GRACKLE_DPRINTF(fmt, ...) |
|
38 | 38 |
#endif |
39 | 39 |
|
40 | 40 |
typedef target_phys_addr_t pci_addr_t; |
b/hw/heathrow_pic.c | ||
---|---|---|
29 | 29 |
//#define DEBUG_PIC |
30 | 30 |
|
31 | 31 |
#ifdef DEBUG_PIC |
32 |
#define PIC_DPRINTF(fmt, args...) \
|
|
33 |
do { printf("PIC: " fmt , ##args); } while (0)
|
|
32 |
#define PIC_DPRINTF(fmt, ...) \
|
|
33 |
do { printf("PIC: " fmt , ## __VA_ARGS__); } while (0)
|
|
34 | 34 |
#else |
35 |
#define PIC_DPRINTF(fmt, args...)
|
|
35 |
#define PIC_DPRINTF(fmt, ...) |
|
36 | 36 |
#endif |
37 | 37 |
|
38 | 38 |
typedef struct HeathrowPIC { |
b/hw/iommu.c | ||
---|---|---|
28 | 28 |
//#define DEBUG_IOMMU |
29 | 29 |
|
30 | 30 |
#ifdef DEBUG_IOMMU |
31 |
#define DPRINTF(fmt, args...) \
|
|
32 |
do { printf("IOMMU: " fmt , ##args); } while (0)
|
|
31 |
#define DPRINTF(fmt, ...) \
|
|
32 |
do { printf("IOMMU: " fmt , ## __VA_ARGS__); } while (0)
|
|
33 | 33 |
#else |
34 |
#define DPRINTF(fmt, args...)
|
|
34 |
#define DPRINTF(fmt, ...) |
|
35 | 35 |
#endif |
36 | 36 |
|
37 | 37 |
#define IOMMU_NREGS (4*4096/4) |
b/hw/lsi53c895a.c | ||
---|---|---|
19 | 19 |
//#define DEBUG_LSI_REG |
20 | 20 |
|
21 | 21 |
#ifdef DEBUG_LSI |
22 |
#define DPRINTF(fmt, args...) \
|
|
23 |
do { printf("lsi_scsi: " fmt , ##args); } while (0)
|
|
24 |
#define BADF(fmt, args...) \
|
|
25 |
do { fprintf(stderr, "lsi_scsi: error: " fmt , ##args); exit(1);} while (0)
|
|
22 |
#define DPRINTF(fmt, ...) \ |
|
23 |
do { printf("lsi_scsi: " fmt , ## __VA_ARGS__); } while (0)
|
|
24 |
#define BADF(fmt, ...) \ |
|
25 |
do { fprintf(stderr, "lsi_scsi: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
|
26 | 26 |
#else |
27 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
28 |
#define BADF(fmt, args...) \
|
|
29 |
do { fprintf(stderr, "lsi_scsi: error: " fmt , ##args);} while (0)
|
|
27 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
28 |
#define BADF(fmt, ...) \ |
|
29 |
do { fprintf(stderr, "lsi_scsi: error: " fmt , ## __VA_ARGS__);} while (0)
|
|
30 | 30 |
#endif |
31 | 31 |
|
32 | 32 |
#define LSI_SCNTL0_TRG 0x01 |
b/hw/m48t59.c | ||
---|---|---|
30 | 30 |
//#define DEBUG_NVRAM |
31 | 31 |
|
32 | 32 |
#if defined(DEBUG_NVRAM) |
33 |
#define NVRAM_PRINTF(fmt, args...) do { printf(fmt , ##args); } while (0)
|
|
33 |
#define NVRAM_PRINTF(fmt, ...) do { printf(fmt , ## __VA_ARGS__); } while (0)
|
|
34 | 34 |
#else |
35 |
#define NVRAM_PRINTF(fmt, args...) do { } while (0)
|
|
35 |
#define NVRAM_PRINTF(fmt, ...) do { } while (0) |
|
36 | 36 |
#endif |
37 | 37 |
|
38 | 38 |
/* |
b/hw/mac_dbdma.c | ||
---|---|---|
44 | 44 |
//#define DEBUG_DBDMA |
45 | 45 |
|
46 | 46 |
#ifdef DEBUG_DBDMA |
47 |
#define DBDMA_DPRINTF(fmt, args...) \
|
|
48 |
do { printf("DBDMA: " fmt , ##args); } while (0)
|
|
47 |
#define DBDMA_DPRINTF(fmt, ...) \
|
|
48 |
do { printf("DBDMA: " fmt , ## __VA_ARGS__); } while (0)
|
|
49 | 49 |
#else |
50 |
#define DBDMA_DPRINTF(fmt, args...)
|
|
50 |
#define DBDMA_DPRINTF(fmt, ...) |
|
51 | 51 |
#endif |
52 | 52 |
|
53 | 53 |
/* |
b/hw/mac_nvram.c | ||
---|---|---|
31 | 31 |
//#define DEBUG_NVR |
32 | 32 |
|
33 | 33 |
#ifdef DEBUG_NVR |
34 |
#define NVR_DPRINTF(fmt, args...) \
|
|
35 |
do { printf("NVR: " fmt , ##args); } while (0)
|
|
34 |
#define NVR_DPRINTF(fmt, ...) \
|
|
35 |
do { printf("NVR: " fmt , ## __VA_ARGS__); } while (0)
|
|
36 | 36 |
#else |
37 |
#define NVR_DPRINTF(fmt, args...)
|
|
37 |
#define NVR_DPRINTF(fmt, ...) |
|
38 | 38 |
#endif |
39 | 39 |
|
40 | 40 |
struct MacIONVRAMState { |
b/hw/mcf_fec.c | ||
---|---|---|
14 | 14 |
//#define DEBUG_FEC 1 |
15 | 15 |
|
16 | 16 |
#ifdef DEBUG_FEC |
17 |
#define DPRINTF(fmt, args...) \
|
|
18 |
do { printf("mcf_fec: " fmt , ##args); } while (0)
|
|
17 |
#define DPRINTF(fmt, ...) \ |
|
18 |
do { printf("mcf_fec: " fmt , ## __VA_ARGS__); } while (0)
|
|
19 | 19 |
#else |
20 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
20 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
21 | 21 |
#endif |
22 | 22 |
|
23 | 23 |
#define FEC_MAX_FRAME_SIZE 2032 |
b/hw/mips_malta.c | ||
---|---|---|
114 | 114 |
//~ #define DEBUG |
115 | 115 |
|
116 | 116 |
#if defined(DEBUG) |
117 |
# define logout(fmt, args...) fprintf(stderr, "MALTA\t%-24s" fmt, __func__, ##args)
|
|
117 |
# define logout(fmt, ...) fprintf(stderr, "MALTA\t%-24s" fmt, __func__, ## __VA_ARGS__)
|
|
118 | 118 |
#else |
119 |
# define logout(fmt, args...) ((void)0)
|
|
119 |
# define logout(fmt, ...) ((void)0) |
|
120 | 120 |
#endif |
121 | 121 |
|
122 | 122 |
struct _eeprom24c0x_t { |
b/hw/openpic.c | ||
---|---|---|
40 | 40 |
//#define DEBUG_OPENPIC |
41 | 41 |
|
42 | 42 |
#ifdef DEBUG_OPENPIC |
43 |
#define DPRINTF(fmt, args...) do { printf(fmt , ##args); } while (0)
|
|
43 |
#define DPRINTF(fmt, ...) do { printf(fmt , ## __VA_ARGS__); } while (0)
|
|
44 | 44 |
#else |
45 |
#define DPRINTF(fmt, args...) do { } while (0)
|
|
45 |
#define DPRINTF(fmt, ...) do { } while (0) |
|
46 | 46 |
#endif |
47 | 47 |
|
48 | 48 |
#define USE_MPCxxx /* Intel model is broken, for now */ |
b/hw/parallel.c | ||
---|---|---|
30 | 30 |
//#define DEBUG_PARALLEL |
31 | 31 |
|
32 | 32 |
#ifdef DEBUG_PARALLEL |
33 |
#define pdebug(fmt, arg...) printf("pp: " fmt, ##arg)
|
|
33 |
#define pdebug(fmt, ...) printf("pp: " fmt, ## __VA_ARGS__)
|
|
34 | 34 |
#else |
35 |
#define pdebug(fmt, arg...) ((void)0)
|
|
35 |
#define pdebug(fmt, ...) ((void)0) |
|
36 | 36 |
#endif |
37 | 37 |
|
38 | 38 |
#define PARA_REG_DATA 0 |
b/hw/pci_host.h | ||
---|---|---|
29 | 29 |
//#define DEBUG_PCI |
30 | 30 |
|
31 | 31 |
#ifdef DEBUG_PCI |
32 |
#define PCI_DPRINTF(fmt, args...) \
|
|
33 |
do { printf("pci_host_data: " fmt , ##args); } while (0)
|
|
32 |
#define PCI_DPRINTF(fmt, ...) \ |
|
33 |
do { printf("pci_host_data: " fmt , ## __VA_ARGS__); } while (0)
|
|
34 | 34 |
#else |
35 |
#define PCI_DPRINTF(fmt, args...)
|
|
35 |
#define PCI_DPRINTF(fmt, ...) |
|
36 | 36 |
#endif |
37 | 37 |
|
38 | 38 |
typedef struct { |
b/hw/pflash_cfi01.c | ||
---|---|---|
42 | 42 |
#include "block.h" |
43 | 43 |
#include "qemu-timer.h" |
44 | 44 |
|
45 |
#define PFLASH_BUG(fmt, args...) \
|
|
45 |
#define PFLASH_BUG(fmt, ...) \ |
|
46 | 46 |
do { \ |
47 |
printf("PFLASH: Possible BUG - " fmt, ##args); \
|
|
47 |
printf("PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \
|
|
48 | 48 |
exit(1); \ |
49 | 49 |
} while(0) |
50 | 50 |
|
51 | 51 |
/* #define PFLASH_DEBUG */ |
52 | 52 |
#ifdef PFLASH_DEBUG |
53 |
#define DPRINTF(fmt, args...) \
|
|
53 |
#define DPRINTF(fmt, ...) \
|
|
54 | 54 |
do { \ |
55 |
printf("PFLASH: " fmt , ##args); \
|
|
55 |
printf("PFLASH: " fmt , ## __VA_ARGS__); \
|
|
56 | 56 |
} while (0) |
57 | 57 |
#else |
58 |
#define DPRINTF(fmt, args...) do { } while (0)
|
|
58 |
#define DPRINTF(fmt, ...) do { } while (0) |
|
59 | 59 |
#endif |
60 | 60 |
|
61 | 61 |
struct pflash_t { |
b/hw/pflash_cfi02.c | ||
---|---|---|
43 | 43 |
|
44 | 44 |
//#define PFLASH_DEBUG |
45 | 45 |
#ifdef PFLASH_DEBUG |
46 |
#define DPRINTF(fmt, args...) \
|
|
46 |
#define DPRINTF(fmt, ...) \
|
|
47 | 47 |
do { \ |
48 |
printf("PFLASH: " fmt , ##args); \
|
|
48 |
printf("PFLASH: " fmt , ## __VA_ARGS__); \
|
|
49 | 49 |
} while (0) |
50 | 50 |
#else |
51 |
#define DPRINTF(fmt, args...) do { } while (0)
|
|
51 |
#define DPRINTF(fmt, ...) do { } while (0) |
|
52 | 52 |
#endif |
53 | 53 |
|
54 | 54 |
struct pflash_t { |
b/hw/pl022.c | ||
---|---|---|
13 | 13 |
//#define DEBUG_PL022 1 |
14 | 14 |
|
15 | 15 |
#ifdef DEBUG_PL022 |
16 |
#define DPRINTF(fmt, args...) \
|
|
17 |
do { printf("pl022: " fmt , ##args); } while (0)
|
|
18 |
#define BADF(fmt, args...) \
|
|
19 |
do { fprintf(stderr, "pl022: error: " fmt , ##args); exit(1);} while (0)
|
|
16 |
#define DPRINTF(fmt, ...) \ |
|
17 |
do { printf("pl022: " fmt , ## __VA_ARGS__); } while (0)
|
|
18 |
#define BADF(fmt, ...) \ |
|
19 |
do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
|
20 | 20 |
#else |
21 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
22 |
#define BADF(fmt, args...) \
|
|
23 |
do { fprintf(stderr, "pl022: error: " fmt , ##args);} while (0)
|
|
21 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
22 |
#define BADF(fmt, ...) \ |
|
23 |
do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__);} while (0)
|
|
24 | 24 |
#endif |
25 | 25 |
|
26 | 26 |
#define PL022_CR1_LBM 0x01 |
b/hw/pl031.c | ||
---|---|---|
16 | 16 |
//#define DEBUG_PL031 |
17 | 17 |
|
18 | 18 |
#ifdef DEBUG_PL031 |
19 |
#define DPRINTF(fmt, args...) \
|
|
20 |
do { printf("pl031: " fmt , ##args); } while (0)
|
|
19 |
#define DPRINTF(fmt, ...) \ |
|
20 |
do { printf("pl031: " fmt , ## __VA_ARGS__); } while (0)
|
|
21 | 21 |
#else |
22 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
22 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
23 | 23 |
#endif |
24 | 24 |
|
25 | 25 |
#define RTC_DR 0x00 /* Data read register */ |
b/hw/pl061.c | ||
---|---|---|
14 | 14 |
//#define DEBUG_PL061 1 |
15 | 15 |
|
16 | 16 |
#ifdef DEBUG_PL061 |
17 |
#define DPRINTF(fmt, args...) \
|
|
18 |
do { printf("pl061: " fmt , ##args); } while (0)
|
|
19 |
#define BADF(fmt, args...) \
|
|
20 |
do { fprintf(stderr, "pl061: error: " fmt , ##args); exit(1);} while (0)
|
|
17 |
#define DPRINTF(fmt, ...) \ |
|
18 |
do { printf("pl061: " fmt , ## __VA_ARGS__); } while (0)
|
|
19 |
#define BADF(fmt, ...) \ |
|
20 |
do { fprintf(stderr, "pl061: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
|
21 | 21 |
#else |
22 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
23 |
#define BADF(fmt, args...) \
|
|
24 |
do { fprintf(stderr, "pl061: error: " fmt , ##args);} while (0)
|
|
22 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
23 |
#define BADF(fmt, ...) \ |
|
24 |
do { fprintf(stderr, "pl061: error: " fmt , ## __VA_ARGS__);} while (0)
|
|
25 | 25 |
#endif |
26 | 26 |
|
27 | 27 |
static const uint8_t pl061_id[12] = |
b/hw/pl181.c | ||
---|---|---|
14 | 14 |
//#define DEBUG_PL181 1 |
15 | 15 |
|
16 | 16 |
#ifdef DEBUG_PL181 |
17 |
#define DPRINTF(fmt, args...) \
|
|
18 |
do { printf("pl181: " fmt , ##args); } while (0)
|
|
17 |
#define DPRINTF(fmt, ...) \ |
|
18 |
do { printf("pl181: " fmt , ## __VA_ARGS__); } while (0)
|
|
19 | 19 |
#else |
20 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
20 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
21 | 21 |
#endif |
22 | 22 |
|
23 | 23 |
#define PL181_FIFO_LEN 16 |
b/hw/ppc4xx_pci.c | ||
---|---|---|
33 | 33 |
#ifdef DEBUG |
34 | 34 |
#define DPRINTF(fmt, ...) do { printf(fmt, ## __VA_ARGS__); } while (0) |
35 | 35 |
#else |
36 |
#define DPRINTF(fmt, args...)
|
|
36 |
#define DPRINTF(fmt, ...) |
|
37 | 37 |
#endif /* DEBUG */ |
38 | 38 |
|
39 | 39 |
struct PCIMasterMap { |
b/hw/ppc_newworld.c | ||
---|---|---|
44 | 44 |
//#define DEBUG_UNIN |
45 | 45 |
|
46 | 46 |
#ifdef DEBUG_UNIN |
47 |
#define UNIN_DPRINTF(fmt, args...) \
|
|
48 |
do { printf("UNIN: " fmt , ##args); } while (0)
|
|
47 |
#define UNIN_DPRINTF(fmt, ...) \
|
|
48 |
do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)
|
|
49 | 49 |
#else |
50 |
#define UNIN_DPRINTF(fmt, args...)
|
|
50 |
#define UNIN_DPRINTF(fmt, ...) |
|
51 | 51 |
#endif |
52 | 52 |
|
53 | 53 |
/* UniN device */ |
b/hw/ppc_prep.c | ||
---|---|---|
50 | 50 |
#endif |
51 | 51 |
|
52 | 52 |
#if defined (HARD_DEBUG_PPC_IO) |
53 |
#define PPC_IO_DPRINTF(fmt, args...) \
|
|
53 |
#define PPC_IO_DPRINTF(fmt, ...) \
|
|
54 | 54 |
do { \ |
55 | 55 |
if (qemu_loglevel_mask(CPU_LOG_IOPORT)) { \ |
56 |
qemu_log("%s: " fmt, __func__ , ##args); \
|
|
56 |
qemu_log("%s: " fmt, __func__ , ## __VA_ARGS__); \
|
|
57 | 57 |
} else { \ |
58 |
printf("%s : " fmt, __func__ , ##args); \
|
|
58 |
printf("%s : " fmt, __func__ , ## __VA_ARGS__); \
|
|
59 | 59 |
} \ |
60 | 60 |
} while (0) |
61 | 61 |
#elif defined (DEBUG_PPC_IO) |
62 |
#define PPC_IO_DPRINTF(fmt, args...) qemu_log_mask(CPU_LOG_IOPORT, ## __VA_ARGS__)
|
|
62 |
#define PPC_IO_DPRINTF(fmt, ...) qemu_log_mask(CPU_LOG_IOPORT, ## __VA_ARGS__) |
|
63 | 63 |
#else |
64 |
#define PPC_IO_DPRINTF(fmt, args...) do { } while (0)
|
|
64 |
#define PPC_IO_DPRINTF(fmt, ...) do { } while (0) |
|
65 | 65 |
#endif |
66 | 66 |
|
67 | 67 |
/* Constants for devices init */ |
b/hw/ppce500_pci.c | ||
---|---|---|
24 | 24 |
#include "qemu-log.h" |
25 | 25 |
|
26 | 26 |
#ifdef DEBUG_PCI |
27 |
#define pci_debug(fmt, arg...) fprintf(stderr, fmt, ##arg)
|
|
27 |
#define pci_debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
|
|
28 | 28 |
#else |
29 |
#define pci_debug(fmt, arg...)
|
|
29 |
#define pci_debug(fmt, ...) |
|
30 | 30 |
#endif |
31 | 31 |
|
32 | 32 |
#define PCIE500_CFGADDR 0x0 |
b/hw/rc4030.c | ||
---|---|---|
33 | 33 |
//#define DEBUG_RC4030_DMA |
34 | 34 |
|
35 | 35 |
#ifdef DEBUG_RC4030 |
36 |
#define DPRINTF(fmt, args...) \
|
|
37 |
do { printf("rc4030: " fmt , ##args); } while (0)
|
|
36 |
#define DPRINTF(fmt, ...) \ |
|
37 |
do { printf("rc4030: " fmt , ## __VA_ARGS__); } while (0)
|
|
38 | 38 |
static const char* irq_names[] = { "parallel", "floppy", "sound", "video", |
39 | 39 |
"network", "scsi", "keyboard", "mouse", "serial0", "serial1" }; |
40 | 40 |
#else |
41 |
#define DPRINTF(fmt, args...)
|
|
41 |
#define DPRINTF(fmt, ...) |
|
42 | 42 |
#endif |
43 | 43 |
|
44 |
#define RC4030_ERROR(fmt, args...) \
|
|
45 |
do { fprintf(stderr, "rc4030 ERROR: %s: " fmt, __func__ , ##args); } while (0)
|
|
44 |
#define RC4030_ERROR(fmt, ...) \ |
|
45 |
do { fprintf(stderr, "rc4030 ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)
|
|
46 | 46 |
|
47 | 47 |
/********************************************************/ |
48 | 48 |
/* rc4030 emulation */ |
b/hw/sbi.c | ||
---|---|---|
28 | 28 |
//#define DEBUG_IRQ |
29 | 29 |
|
30 | 30 |
#ifdef DEBUG_IRQ |
31 |
#define DPRINTF(fmt, args...) \
|
|
32 |
do { printf("IRQ: " fmt , ##args); } while (0)
|
|
31 |
#define DPRINTF(fmt, ...) \
|
|
32 |
do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)
|
|
33 | 33 |
#else |
34 |
#define DPRINTF(fmt, args...)
|
|
34 |
#define DPRINTF(fmt, ...) |
|
35 | 35 |
#endif |
36 | 36 |
|
37 | 37 |
#define MAX_CPUS 16 |
b/hw/scsi-disk.c | ||
---|---|---|
18 | 18 |
//#define DEBUG_SCSI |
19 | 19 |
|
20 | 20 |
#ifdef DEBUG_SCSI |
21 |
#define DPRINTF(fmt, args...) \
|
|
22 |
do { printf("scsi-disk: " fmt , ##args); } while (0)
|
|
21 |
#define DPRINTF(fmt, ...) \ |
|
22 |
do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
|
|
23 | 23 |
#else |
24 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
24 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
25 | 25 |
#endif |
26 | 26 |
|
27 |
#define BADF(fmt, args...) \
|
|
28 |
do { fprintf(stderr, "scsi-disk: " fmt , ##args); } while (0)
|
|
27 |
#define BADF(fmt, ...) \ |
|
28 |
do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
|
|
29 | 29 |
|
30 | 30 |
#include "qemu-common.h" |
31 | 31 |
#include "block.h" |
b/hw/scsi-generic.c | ||
---|---|---|
28 | 28 |
//#define DEBUG_SCSI |
29 | 29 |
|
30 | 30 |
#ifdef DEBUG_SCSI |
31 |
#define DPRINTF(fmt, args...) \
|
|
32 |
do { printf("scsi-generic: " fmt , ##args); } while (0)
|
|
31 |
#define DPRINTF(fmt, ...) \ |
|
32 |
do { printf("scsi-generic: " fmt , ## __VA_ARGS__); } while (0)
|
|
33 | 33 |
#else |
34 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
34 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
35 | 35 |
#endif |
36 | 36 |
|
37 |
#define BADF(fmt, args...) \
|
|
38 |
do { fprintf(stderr, "scsi-generic: " fmt , ##args); } while (0)
|
|
37 |
#define BADF(fmt, ...) \ |
|
38 |
do { fprintf(stderr, "scsi-generic: " fmt , ## __VA_ARGS__); } while (0)
|
|
39 | 39 |
|
40 | 40 |
#include <stdio.h> |
41 | 41 |
#include <sys/types.h> |
b/hw/sd.c | ||
---|---|---|
36 | 36 |
//#define DEBUG_SD 1 |
37 | 37 |
|
38 | 38 |
#ifdef DEBUG_SD |
39 |
#define DPRINTF(fmt, args...) \
|
|
40 |
do { fprintf(stderr, "SD: " fmt , ##args); } while (0)
|
|
39 |
#define DPRINTF(fmt, ...) \ |
|
40 |
do { fprintf(stderr, "SD: " fmt , ## __VA_ARGS__); } while (0)
|
|
41 | 41 |
#else |
42 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
42 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
43 | 43 |
#endif |
44 | 44 |
|
45 | 45 |
typedef enum { |
b/hw/sh_intc.h | ||
---|---|---|
18 | 18 |
intc_enum enum_ids[32]; |
19 | 19 |
}; |
20 | 20 |
|
21 |
#define INTC_GROUP(enum_id, ids...) { enum_id, { ids } }
|
|
21 |
#define INTC_GROUP(enum_id, ...) { enum_id, { __VA_ARGS__ } }
|
|
22 | 22 |
|
23 | 23 |
struct intc_mask_reg { |
24 | 24 |
unsigned long set_reg, clr_reg, reg_width; |
b/hw/slavio_intctl.c | ||
---|---|---|
29 | 29 |
//#define DEBUG_IRQ |
30 | 30 |
|
31 | 31 |
#ifdef DEBUG_IRQ |
32 |
#define DPRINTF(fmt, args...) \
|
|
33 |
do { printf("IRQ: " fmt , ##args); } while (0)
|
|
32 |
#define DPRINTF(fmt, ...) \
|
|
33 |
do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)
|
|
34 | 34 |
#else |
35 |
#define DPRINTF(fmt, args...)
|
|
35 |
#define DPRINTF(fmt, ...) |
|
36 | 36 |
#endif |
37 | 37 |
|
38 | 38 |
/* |
b/hw/slavio_misc.c | ||
---|---|---|
37 | 37 |
*/ |
38 | 38 |
|
39 | 39 |
#ifdef DEBUG_MISC |
40 |
#define MISC_DPRINTF(fmt, args...) \
|
|
41 |
do { printf("MISC: " fmt , ##args); } while (0)
|
|
40 |
#define MISC_DPRINTF(fmt, ...) \
|
|
41 |
do { printf("MISC: " fmt , ## __VA_ARGS__); } while (0)
|
|
42 | 42 |
#else |
43 |
#define MISC_DPRINTF(fmt, args...)
|
|
43 |
#define MISC_DPRINTF(fmt, ...) |
|
44 | 44 |
#endif |
45 | 45 |
|
46 | 46 |
typedef struct MiscState { |
b/hw/slavio_timer.c | ||
---|---|---|
28 | 28 |
//#define DEBUG_TIMER |
29 | 29 |
|
30 | 30 |
#ifdef DEBUG_TIMER |
31 |
#define DPRINTF(fmt, args...) \
|
|
32 |
do { printf("TIMER: " fmt , ##args); } while (0)
|
|
31 |
#define DPRINTF(fmt, ...) \
|
|
32 |
do { printf("TIMER: " fmt , ## __VA_ARGS__); } while (0)
|
|
33 | 33 |
#else |
34 |
#define DPRINTF(fmt, args...) do {} while (0)
|
|
34 |
#define DPRINTF(fmt, ...) do {} while (0) |
|
35 | 35 |
#endif |
36 | 36 |
|
37 | 37 |
/* |
b/hw/sm501.c | ||
---|---|---|
47 | 47 |
//#define DEBUG_BITBLT |
48 | 48 |
|
49 | 49 |
#ifdef DEBUG_SM501 |
50 |
#define SM501_DPRINTF(fmt...) printf(fmt)
|
|
50 |
#define SM501_DPRINTF(fmt, ...) printf(fmt, ## __VA_ARGS__)
|
|
51 | 51 |
#else |
52 |
#define SM501_DPRINTF(fmt...) do {} while(0) |
|
52 |
#define SM501_DPRINTF(fmt, ...) do {} while(0)
|
|
53 | 53 |
#endif |
54 | 54 |
|
55 | 55 |
|
b/hw/smbus.c | ||
---|---|---|
16 | 16 |
//#define DEBUG_SMBUS 1 |
17 | 17 |
|
18 | 18 |
#ifdef DEBUG_SMBUS |
19 |
#define DPRINTF(fmt, args...) \
|
|
20 |
do { printf("smbus(%02x): " fmt , dev->i2c.address, ##args); } while (0)
|
|
21 |
#define BADF(fmt, args...) \
|
|
22 |
do { fprintf(stderr, "smbus: error: " fmt , ##args); exit(1);} while (0)
|
|
19 |
#define DPRINTF(fmt, ...) \ |
|
20 |
do { printf("smbus(%02x): " fmt , dev->i2c.address, ## __VA_ARGS__); } while (0)
|
|
21 |
#define BADF(fmt, ...) \ |
|
22 |
do { fprintf(stderr, "smbus: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
|
23 | 23 |
#else |
24 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
25 |
#define BADF(fmt, args...) \
|
|
26 |
do { fprintf(stderr, "smbus: error: " fmt , ##args);} while (0)
|
|
24 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
25 |
#define BADF(fmt, ...) \ |
|
26 |
do { fprintf(stderr, "smbus: error: " fmt , ## __VA_ARGS__);} while (0)
|
|
27 | 27 |
#endif |
28 | 28 |
|
29 | 29 |
enum { |
b/hw/sparc32_dma.c | ||
---|---|---|
37 | 37 |
*/ |
38 | 38 |
|
39 | 39 |
#ifdef DEBUG_DMA |
40 |
#define DPRINTF(fmt, args...) \
|
|
41 |
do { printf("DMA: " fmt , ##args); } while (0)
|
|
40 |
#define DPRINTF(fmt, ...) \
|
|
41 |
do { printf("DMA: " fmt , ## __VA_ARGS__); } while (0)
|
|
42 | 42 |
#else |
43 |
#define DPRINTF(fmt, args...)
|
|
43 |
#define DPRINTF(fmt, ...) |
|
44 | 44 |
#endif |
45 | 45 |
|
46 | 46 |
#define DMA_REGS 4 |
b/hw/ssd0303.c | ||
---|---|---|
17 | 17 |
//#define DEBUG_SSD0303 1 |
18 | 18 |
|
19 | 19 |
#ifdef DEBUG_SSD0303 |
20 |
#define DPRINTF(fmt, args...) \
|
|
21 |
do { printf("ssd0303: " fmt , ##args); } while (0)
|
|
22 |
#define BADF(fmt, args...) \
|
|
23 |
do { fprintf(stderr, "ssd0303: error: " fmt , ##args); exit(1);} while (0)
|
|
20 |
#define DPRINTF(fmt, ...) \ |
|
21 |
do { printf("ssd0303: " fmt , ## __VA_ARGS__); } while (0)
|
|
22 |
#define BADF(fmt, ...) \ |
|
23 |
do { fprintf(stderr, "ssd0303: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
|
24 | 24 |
#else |
25 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
26 |
#define BADF(fmt, args...) \
|
|
27 |
do { fprintf(stderr, "ssd0303: error: " fmt , ##args);} while (0)
|
|
25 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
26 |
#define BADF(fmt, ...) \ |
|
27 |
do { fprintf(stderr, "ssd0303: error: " fmt , ## __VA_ARGS__);} while (0)
|
|
28 | 28 |
#endif |
29 | 29 |
|
30 | 30 |
/* Scaling factor for pixels. */ |
b/hw/ssd0323.c | ||
---|---|---|
17 | 17 |
//#define DEBUG_SSD0323 1 |
18 | 18 |
|
19 | 19 |
#ifdef DEBUG_SSD0323 |
20 |
#define DPRINTF(fmt, args...) \
|
|
21 |
do { printf("ssd0323: " fmt , ##args); } while (0)
|
|
22 |
#define BADF(fmt, args...) \
|
|
23 |
do { fprintf(stderr, "ssd0323: error: " fmt , ##args); exit(1);} while (0)
|
|
20 |
#define DPRINTF(fmt, ...) \ |
|
21 |
do { printf("ssd0323: " fmt , ## __VA_ARGS__); } while (0)
|
|
22 |
#define BADF(fmt, ...) \ |
|
23 |
do { fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
|
24 | 24 |
#else |
25 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
26 |
#define BADF(fmt, args...) \
|
|
27 |
do { fprintf(stderr, "ssd0323: error: " fmt , ##args);} while (0)
|
|
25 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
26 |
#define BADF(fmt, ...) \ |
|
27 |
do { fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__);} while (0)
|
|
28 | 28 |
#endif |
29 | 29 |
|
30 | 30 |
/* Scaling factor for pixels. */ |
b/hw/ssi-sd.c | ||
---|---|---|
13 | 13 |
//#define DEBUG_SSI_SD 1 |
14 | 14 |
|
15 | 15 |
#ifdef DEBUG_SSI_SD |
16 |
#define DPRINTF(fmt, args...) \
|
|
17 |
do { printf("ssi_sd: " fmt , ##args); } while (0)
|
|
18 |
#define BADF(fmt, args...) \
|
|
19 |
do { fprintf(stderr, "ssi_sd: error: " fmt , ##args); exit(1);} while (0)
|
|
16 |
#define DPRINTF(fmt, ...) \ |
|
17 |
do { printf("ssi_sd: " fmt , ## __VA_ARGS__); } while (0)
|
|
18 |
#define BADF(fmt, ...) \ |
|
19 |
do { fprintf(stderr, "ssi_sd: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
|
20 | 20 |
#else |
21 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
22 |
#define BADF(fmt, args...) \
|
|
23 |
do { fprintf(stderr, "ssi_sd: error: " fmt , ##args);} while (0)
|
|
21 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
22 |
#define BADF(fmt, ...) \ |
|
23 |
do { fprintf(stderr, "ssi_sd: error: " fmt , ## __VA_ARGS__);} while (0)
|
|
24 | 24 |
#endif |
25 | 25 |
|
26 | 26 |
typedef enum { |
b/hw/stellaris_enet.c | ||
---|---|---|
14 | 14 |
//#define DEBUG_STELLARIS_ENET 1 |
15 | 15 |
|
16 | 16 |
#ifdef DEBUG_STELLARIS_ENET |
17 |
#define DPRINTF(fmt, args...) \
|
|
18 |
do { printf("stellaris_enet: " fmt , ##args); } while (0)
|
|
19 |
#define BADF(fmt, args...) \
|
|
20 |
do { fprintf(stderr, "stellaris_enet: error: " fmt , ##args); exit(1);} while (0)
|
|
17 |
#define DPRINTF(fmt, ...) \ |
|
18 |
do { printf("stellaris_enet: " fmt , ## __VA_ARGS__); } while (0)
|
|
19 |
#define BADF(fmt, ...) \ |
|
20 |
do { fprintf(stderr, "stellaris_enet: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
|
|
21 | 21 |
#else |
22 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
23 |
#define BADF(fmt, args...) \
|
|
24 |
do { fprintf(stderr, "stellaris_enet: error: " fmt , ##args);} while (0)
|
|
22 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
23 |
#define BADF(fmt, ...) \ |
|
24 |
do { fprintf(stderr, "stellaris_enet: error: " fmt , ## __VA_ARGS__);} while (0)
|
|
25 | 25 |
#endif |
26 | 26 |
|
27 | 27 |
#define SE_INT_RX 0x01 |
b/hw/sun4c_intctl.c | ||
---|---|---|
28 | 28 |
//#define DEBUG_IRQ |
29 | 29 |
|
30 | 30 |
#ifdef DEBUG_IRQ |
31 |
#define DPRINTF(fmt, args...) \
|
|
32 |
do { printf("IRQ: " fmt , ##args); } while (0)
|
|
31 |
#define DPRINTF(fmt, ...) \
|
|
32 |
do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)
|
|
33 | 33 |
#else |
34 |
#define DPRINTF(fmt, args...)
|
|
34 |
#define DPRINTF(fmt, ...) |
|
35 | 35 |
#endif |
36 | 36 |
|
37 | 37 |
/* |
b/hw/sun4m.c | ||
---|---|---|
68 | 68 |
*/ |
69 | 69 |
|
70 | 70 |
#ifdef DEBUG_IRQ |
71 |
#define DPRINTF(fmt, args...) \
|
|
72 |
do { printf("CPUIRQ: " fmt , ##args); } while (0)
|
|
71 |
#define DPRINTF(fmt, ...) \
|
|
72 |
do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)
|
|
73 | 73 |
#else |
74 |
#define DPRINTF(fmt, args...)
|
|
74 |
#define DPRINTF(fmt, ...) |
|
75 | 75 |
#endif |
76 | 76 |
|
77 | 77 |
#define KERNEL_LOAD_ADDR 0x00004000 |
b/hw/sun4u.c | ||
---|---|---|
36 | 36 |
//#define DEBUG_IRQ |
37 | 37 |
|
38 | 38 |
#ifdef DEBUG_IRQ |
39 |
#define DPRINTF(fmt, args...) \
|
|
40 |
do { printf("CPUIRQ: " fmt , ##args); } while (0)
|
|
39 |
#define DPRINTF(fmt, ...) \
|
|
40 |
do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)
|
|
41 | 41 |
#else |
42 |
#define DPRINTF(fmt, args...)
|
|
42 |
#define DPRINTF(fmt, ...) |
|
43 | 43 |
#endif |
44 | 44 |
|
45 | 45 |
#define KERNEL_LOAD_ADDR 0x00404000 |
b/hw/unin_pci.c | ||
---|---|---|
29 | 29 |
//#define DEBUG_UNIN |
30 | 30 |
|
31 | 31 |
#ifdef DEBUG_UNIN |
32 |
#define UNIN_DPRINTF(fmt, args...) \
|
|
33 |
do { printf("UNIN: " fmt , ##args); } while (0)
|
|
32 |
#define UNIN_DPRINTF(fmt, ...) \
|
|
33 |
do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)
|
|
34 | 34 |
#else |
35 |
#define UNIN_DPRINTF(fmt, args...)
|
|
35 |
#define UNIN_DPRINTF(fmt, ...) |
|
36 | 36 |
#endif |
37 | 37 |
|
38 | 38 |
typedef target_phys_addr_t pci_addr_t; |
b/hw/usb-msd.c | ||
---|---|---|
16 | 16 |
//#define DEBUG_MSD |
17 | 17 |
|
18 | 18 |
#ifdef DEBUG_MSD |
19 |
#define DPRINTF(fmt, args...) \
|
|
20 |
do { printf("usb-msd: " fmt , ##args); } while (0)
|
|
19 |
#define DPRINTF(fmt, ...) \ |
|
20 |
do { printf("usb-msd: " fmt , ## __VA_ARGS__); } while (0)
|
|
21 | 21 |
#else |
22 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
22 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
23 | 23 |
#endif |
24 | 24 |
|
25 | 25 |
/* USB requests. */ |
b/hw/usb-serial.c | ||
---|---|---|
15 | 15 |
//#define DEBUG_Serial |
16 | 16 |
|
17 | 17 |
#ifdef DEBUG_Serial |
18 |
#define DPRINTF(fmt, args...) \
|
|
19 |
do { printf("usb-serial: " fmt , ##args); } while (0)
|
|
18 |
#define DPRINTF(fmt, ...) \ |
|
19 |
do { printf("usb-serial: " fmt , ## __VA_ARGS__); } while (0)
|
|
20 | 20 |
#else |
21 |
#define DPRINTF(fmt, args...) do {} while(0)
|
|
21 |
#define DPRINTF(fmt, ...) do {} while(0) |
|
22 | 22 |
#endif |
23 | 23 |
|
24 | 24 |
#define RECV_BUF 384 |
b/linux-user/flatload.c | ||
---|---|---|
47 | 47 |
//#define DEBUG |
48 | 48 |
|
49 | 49 |
#ifdef DEBUG |
50 |
#define DBG_FLT(a...) printf(a)
|
|
50 |
#define DBG_FLT(...) printf(__VA_ARGS__)
|
|
51 | 51 |
#else |
52 |
#define DBG_FLT(a...)
|
|
52 |
#define DBG_FLT(...) |
|
53 | 53 |
#endif |
54 | 54 |
|
55 | 55 |
#define flat_reloc_valid(reloc, size) ((reloc) <= (size)) |
b/linux-user/main.c | ||
---|---|---|
1080 | 1080 |
return -1; |
1081 | 1081 |
} |
1082 | 1082 |
|
1083 |
#define EXCP_DUMP(env, fmt, args...) \
|
|
1084 |
do { \
|
|
1085 |
fprintf(stderr, fmt , ##args); \
|
|
1086 |
cpu_dump_state(env, stderr, fprintf, 0); \
|
|
1087 |
qemu_log(fmt, ##args); \
|
|
1088 |
log_cpu_state(env, 0); \
|
|
1083 |
#define EXCP_DUMP(env, fmt, ...) \
|
|
1084 |
do { \ |
|
1085 |
fprintf(stderr, fmt , ## __VA_ARGS__); \
|
|
1086 |
cpu_dump_state(env, stderr, fprintf, 0); \ |
|
1087 |
qemu_log(fmt, ## __VA_ARGS__); \
|
|
1088 |
log_cpu_state(env, 0); \ |
|
1089 | 1089 |
} while (0) |
1090 | 1090 |
|
1091 | 1091 |
void cpu_loop(CPUPPCState *env) |
b/linux-user/syscall.c | ||
---|---|---|
2563 | 2563 |
/* kernel structure types definitions */ |
2564 | 2564 |
#define IFNAMSIZ 16 |
2565 | 2565 |
|
2566 |
#define STRUCT(name, list...) STRUCT_ ## name,
|
|
2566 |
#define STRUCT(name, ...) STRUCT_ ## name, |
|
2567 | 2567 |
#define STRUCT_SPECIAL(name) STRUCT_ ## name, |
2568 | 2568 |
enum { |
2569 | 2569 |
#include "syscall_types.h" |
... | ... | |
2571 | 2571 |
#undef STRUCT |
2572 | 2572 |
#undef STRUCT_SPECIAL |
2573 | 2573 |
|
2574 |
#define STRUCT(name, list...) static const argtype struct_ ## name ## _def[] = { list, TYPE_NULL };
|
|
2574 |
#define STRUCT(name, ...) static const argtype struct_ ## name ## _def[] = { __VA_ARGS__, TYPE_NULL };
|
|
2575 | 2575 |
#define STRUCT_SPECIAL(name) |
2576 | 2576 |
#include "syscall_types.h" |
2577 | 2577 |
#undef STRUCT |
... | ... | |
2592 | 2592 |
#define MAX_STRUCT_SIZE 4096 |
2593 | 2593 |
|
2594 | 2594 |
static IOCTLEntry ioctl_entries[] = { |
2595 |
#define IOCTL(cmd, access, types...) \
|
|
2596 |
{ TARGET_ ## cmd, cmd, #cmd, access, { types } },
|
|
2595 |
#define IOCTL(cmd, access, ...) \ |
|
2596 |
{ TARGET_ ## cmd, cmd, #cmd, access, { __VA_ARGS__ } },
|
|
2597 | 2597 |
#include "ioctls.h" |
2598 | 2598 |
{ 0, 0, }, |
2599 | 2599 |
}; |
... | ... | |
3497 | 3497 |
int size; |
3498 | 3498 |
int i; |
3499 | 3499 |
|
3500 |
#define STRUCT(name, list...) thunk_register_struct(STRUCT_ ## name, #name, struct_ ## name ## _def);
|
|
3500 |
#define STRUCT(name, ...) thunk_register_struct(STRUCT_ ## name, #name, struct_ ## name ## _def); |
|
3501 | 3501 |
#define STRUCT_SPECIAL(name) thunk_register_struct_direct(STRUCT_ ## name, #name, &struct_ ## name ## _def); |
3502 | 3502 |
#include "syscall_types.h" |
3503 | 3503 |
#undef STRUCT |
b/slirp/bootp.c | ||
---|---|---|
43 | 43 |
static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE }; |
44 | 44 |
|
45 | 45 |
#ifdef DEBUG |
46 |
#define dprintf(fmt, args...) \
|
|
47 |
if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## args); fflush(dfd); }
|
|
46 |
#define dprintf(fmt, ...) \ |
|
47 |
if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## __VA_ARGS__); fflush(dfd); }
|
|
48 | 48 |
#else |
49 |
#define dprintf(fmt, args...)
|
|
49 |
#define dprintf(fmt, ...) |
|
50 | 50 |
#endif |
51 | 51 |
|
52 | 52 |
static BOOTPClient *get_new_addr(struct in_addr *paddr) |
b/target-i386/ops_sse.h | ||
---|---|---|
20 | 20 |
*/ |
21 | 21 |
#if SHIFT == 0 |
22 | 22 |
#define Reg MMXReg |
23 |
#define XMM_ONLY(x...)
|
|
23 |
#define XMM_ONLY(...) |
|
24 | 24 |
#define B(n) MMX_B(n) |
25 | 25 |
#define W(n) MMX_W(n) |
26 | 26 |
#define L(n) MMX_L(n) |
... | ... | |
28 | 28 |
#define SUFFIX _mmx |
29 | 29 |
#else |
30 | 30 |
#define Reg XMMReg |
31 |
#define XMM_ONLY(x...) x
|
|
31 |
#define XMM_ONLY(...) __VA_ARGS__
|
|
32 | 32 |
#define B(n) XMM_B(n) |
33 | 33 |
#define W(n) XMM_W(n) |
34 | 34 |
#define L(n) XMM_L(n) |
b/target-i386/translate.c | ||
---|---|---|
42 | 42 |
|
43 | 43 |
#ifdef TARGET_X86_64 |
44 | 44 |
#define X86_64_ONLY(x) x |
45 |
#define X86_64_DEF(x...) x
|
|
45 |
#define X86_64_DEF(...) __VA_ARGS__
|
|
46 | 46 |
#define CODE64(s) ((s)->code64) |
47 | 47 |
#define REX_X(s) ((s)->rex_x) |
48 | 48 |
#define REX_B(s) ((s)->rex_b) |
... | ... | |
52 | 52 |
#endif |
53 | 53 |
#else |
54 | 54 |
#define X86_64_ONLY(x) NULL |
55 |
#define X86_64_DEF(x...)
|
|
55 |
#define X86_64_DEF(...) |
|
56 | 56 |
#define CODE64(s) 0 |
57 | 57 |
#define REX_X(s) 0 |
58 | 58 |
#define REX_B(s) 0 |
b/target-mips/translate.c | ||
---|---|---|
501 | 501 |
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", }; |
502 | 502 |
|
503 | 503 |
#ifdef MIPS_DEBUG_DISAS |
504 |
#define MIPS_DEBUG(fmt, args...) \
|
|
504 |
#define MIPS_DEBUG(fmt, ...) \ |
|
505 | 505 |
qemu_log_mask(CPU_LOG_TB_IN_ASM, \ |
506 | 506 |
TARGET_FMT_lx ": %08x " fmt "\n", \ |
507 |
ctx->pc, ctx->opcode , ##args)
|
|
507 |
ctx->pc, ctx->opcode , ## __VA_ARGS__)
|
|
508 | 508 |
#define LOG_DISAS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__) |
509 | 509 |
#else |
510 |
#define MIPS_DEBUG(fmt, args...) do { } while(0)
|
|
510 |
#define MIPS_DEBUG(fmt, ...) do { } while(0) |
|
511 | 511 |
#define LOG_DISAS(...) do { } while (0) |
512 | 512 |
#endif |
513 | 513 |
|
b/target-sparc/op_helper.c | ||
---|---|---|
13 | 13 |
//#define DEBUG_PCALL |
14 | 14 |
|
15 | 15 |
#ifdef DEBUG_MMU |
16 |
#define DPRINTF_MMU(fmt, args...) \
|
|
17 |
do { printf("MMU: " fmt , ##args); } while (0)
|
|
16 |
#define DPRINTF_MMU(fmt, ...) \
|
|
17 |
do { printf("MMU: " fmt , ## __VA_ARGS__); } while (0)
|
|
18 | 18 |
#else |
19 |
#define DPRINTF_MMU(fmt, args...) do {} while (0)
|
|
19 |
#define DPRINTF_MMU(fmt, ...) do {} while (0) |
|
20 | 20 |
#endif |
21 | 21 |
|
22 | 22 |
#ifdef DEBUG_MXCC |
23 |
#define DPRINTF_MXCC(fmt, args...) \
|
|
24 |
do { printf("MXCC: " fmt , ##args); } while (0)
|
|
23 |
#define DPRINTF_MXCC(fmt, ...) \
|
|
24 |
do { printf("MXCC: " fmt , ## __VA_ARGS__); } while (0)
|
|
25 | 25 |
#else |
26 |
#define DPRINTF_MXCC(fmt, args...) do {} while (0)
|
|
26 |
#define DPRINTF_MXCC(fmt, ...) do {} while (0) |
|
27 | 27 |
#endif |
28 | 28 |
|
29 | 29 |
#ifdef DEBUG_ASI |
30 |
#define DPRINTF_ASI(fmt, args...) \
|
|
31 |
do { printf("ASI: " fmt , ##args); } while (0)
|
|
30 |
#define DPRINTF_ASI(fmt, ...) \
|
|
31 |
do { printf("ASI: " fmt , ## __VA_ARGS__); } while (0)
|
|
32 | 32 |
#endif |
33 | 33 |
|
34 | 34 |
#ifdef TARGET_SPARC64 |
b/tests/linux-test.c | ||
---|---|---|
65 | 65 |
return ret; |
66 | 66 |
} |
67 | 67 |
|
68 |
#define error(fmt, args...) error1(__FILE__, __LINE__, fmt, ##args)
|
|
68 |
#define error(fmt, ...) error1(__FILE__, __LINE__, fmt, ## __VA_ARGS__)
|
|
69 | 69 |
|
70 | 70 |
#define chk_error(ret) __chk_error(__FILE__, __LINE__, (ret)) |
71 | 71 |
|
Also available in: Unified diff