OpenCBM
|
Define makros for debugging purposes. More...
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | DBG_I_BREAKPOINT() |
Execute a breakpoint. More... | |
#define | OutputDebugString(_xxx) printf( "%s\n", _xxx); |
#define | IN const |
#define | OUT |
#define | STATUS_SUCCESS 0 |
#define | DBG_MEMDUMP(_Where, _Buffer, _Count) dbg_memdump(_Where, _Buffer, _Count) |
output a memory dump to the debugging system More... | |
#define | DBG_MAX_BUFFERLEN 4096 |
Maximum size of a debugging buffer. | |
#define | DBG_MAX_BUFFER 1 /* This *MUST* be a power of 2! */ |
the maximum number of buffers to be used for debugging | |
#define | DBGF_BREAK 0x80000000 |
#define | DBGF_ENTER 0x40000000 |
#define | DBGF_LEAVE 0x20000000 |
#define | DBGF_LEAVE_FAILURE 0x10000000 |
#define | DBGF_PARAM 0x08000000 |
#define | DBGF_PPORT 0x0010 |
#define | DBGF_SUCCESS 0x0008 |
#define | DBGF_WARNING 0x0004 |
#define | DBGF_ERROR 0x0002 |
#define | DBGF_ASSERT 0x0001 |
#define | DBG_I_ASSUME(_x) |
#define | ISDBG_BREAK() (DbgFlags & DBGF_BREAK) |
#define | ISDBG_ENTER() (DbgFlags & DBGF_ENTER) |
#define | ISDBG_LEAVE() (DbgFlags & DBGF_LEAVE) |
#define | ISDBG_LEAVE_FAILURE() (DbgFlags & (DBGF_LEAVE|DBGF_LEAVE_FAILURE)) |
#define | ISDBG_PARAM() (DbgFlags & DBGF_PARAM) |
#define | ISDBG_PPORT() (DbgFlags & DBGF_PPORT) |
#define | ISDBG_SUCCESS() (DbgFlags & DBGF_SUCCESS) |
#define | ISDBG_WARN() (DbgFlags & DBGF_WARNING) |
#define | ISDBG_ERROR() (DbgFlags & DBGF_ERROR) |
#define | ISDBG_ASSERT() (DbgFlags & DBGF_ASSERT) |
#define | ISDBG_PANIC() (1) |
#define | _DBG_PERFORM(_xxx) OutputDebugString(_xxx); |
#define | FUNC_DEF |
#define | _DBG_START_ADD |
#define | _DBG_END_ADD |
#define | DEBUG_BUFFER_NO 0 |
#define | DBG_PREFIX DEBUG_BUFFER_NO, |
#define | _DBGO(_xxx) DbgOutputIntoBuffer _xxx |
#define | _DBG_START() _DBG_START_ADD DbgBufferPos[DEBUG_BUFFER_NO] = 0; DbgOutputIntoBuffer(DBG_PREFIX "%s," __FUNCTION__ "(%u): ", DBG_PROGNAME, __LINE__) |
#define | _DBG_END() DbgOutputIntoBuffer(DBG_PREFIX "\n"); _DBG_PERFORM(&DbgBuffer[DEBUG_BUFFER_NO][0]) _DBG_END_ADD |
#define | DBGO(_xxx) { _DBG_START(); _DBGO(_xxx); _DBG_END() } |
#define | DBG_BREAKPOINT() { if (ISDBG_BREAK()) { DBG_I_BREAKPOINT(); }; } |
#define | FUNC_ENTER() FUNC_DEF { if (ISDBG_ENTER()) { DBGO(( DBG_PREFIX "Entering %s", __FUNCTION__ )); } } |
#define | FUNC_LEAVE() { if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s", __FUNCTION__ )); } return; } |
#define | FUNC_PARAM(_xxx) { if (ISDBG_PARAM()) { _DBG_START(); _DBGO(( DBG_PREFIX "Parameter for %s: ", __FUNCTION__ )); _DBGO( _xxx ); _DBG_END() } } |
#define | FUNC_LEAVE_BOOL(_xxx) { const BOOL _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with BOOL=%s", __FUNCTION__, (_OUT_)?"TRUE":"FALSE" )); } return _OUT_; } |
#define | FUNC_LEAVE_BOOLEAN(_xxx) { const BOOLEAN _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with BOOL=%s", __FUNCTION__, (_OUT_)?"TRUE":"FALSE" )); } return _OUT_; } |
#define | FUNC_LEAVE_INT(_xxx) { const int _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with INT=%u (%d)", __FUNCTION__, (unsigned int)(_OUT_), (signed int)(_OUT_) )); } return _OUT_; } |
#define | FUNC_LEAVE_UINT(_xxx) { const unsigned int _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with INT=%u (%d)", __FUNCTION__, _OUT_, _OUT_ )); } return _OUT_; } |
#define | FUNC_LEAVE_USHORT(_xxx) { const USHORT _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with INT=%u (%d)", __FUNCTION__, (unsigned int)(_OUT_), (signed int)(_OUT_) )); } return _OUT_; } |
#define | FUNC_LEAVE_UCHAR(_xxx) { const UCHAR _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with UCHAR=%u", __FUNCTION__, (unsigned int)(_OUT_) )); } return _OUT_; } |
#define | FUNC_LEAVE_HANDLE(_xxx) { const HANDLE _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with HANDLE=%u", __FUNCTION__, (unsigned int)(_OUT_) )); } return _OUT_; } |
#define | FUNC_LEAVE_STRING(_xxx) { const char * _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with '%s'", __FUNCTION__, (_OUT_) )); } return _xxx; } |
#define | FUNC_LEAVE_ULONG(_xxx) { const ULONG _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with ULONG=%ul", __FUNCTION__, (ULONG) (_OUT_) )); } return _OUT_; } |
#define | FUNC_LEAVE_LONG(_xxx) { const LONG _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with LONG=%l", __FUNCTION__, (LONG) (_OUT_) )); } return _OUT_; } |
#define | FUNC_LEAVE_TYPE(_xxx, _TYPE, _FORMAT) { _TYPE _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with " #_TYPE "=" _FORMAT, __FUNCTION__, (_OUT_) )); } return _OUT_; } |
#define | FUNC_LEAVE_PTR(_xxx, _TYPE) FUNC_LEAVE_TYPE( _xxx, _TYPE, "0x%p") |
#define | FUNC_LEAVE_HMODULE(_xxx) FUNC_LEAVE_TYPE( _xxx, HMODULE, "0x%08x") |
#define | DBG_PPORT(_xxx) { if (ISDBG_PPORT()){ DBGO( _xxx ); } } |
#define | DBG_SUCCESS(_xxx) { if (ISDBG_SUCCESS()) { _DBG_START(); _DBGO( _xxx ); _DBGO((DBG_PREFIX " SUCCESS")); _DBG_END(); } } |
#define | DBG_WARN(_xxx) { if (ISDBG_WARN()) { _DBG_START(); _DBGO(( DBG_PREFIX "Warning: ")); _DBGO( _xxx ); _DBG_END(); } } |
#define | DBG_ERROR(_xxx) { if (ISDBG_ERROR()) { _DBG_START(); _DBGO(( DBG_PREFIX "***ERROR***: ")); _DBGO( _xxx ); _DBG_END(); } } |
#define | DBG_PANIC(_xxx) { if (ISDBG_PANIC()) { _DBG_START(); _DBGO(( DBG_PREFIX "***PANIC***: ")); _DBGO( _xxx ); _DBG_END(); } } |
#define | DBG_ASSERT(_xxx) { if (!(_xxx)) if (ISDBG_ASSERT()) { DBGO(( DBG_PREFIX "***ASSERTION FAILED!***: %s in %s:%s(%u)", #_xxx, __FILE__, __FUNCTION__, __LINE__ )); DBG_BREAKPOINT(); } DBG_I_ASSUME(_xxx); } |
#define | DBG_PRINT(_xxx) { DBGO( _xxx ); } |
#define | DBG_VERIFY(_xxx) DBG_ASSERT( _xxx ) |
#define | DBGDO(_xxx) _xxx |
#define | DBG_IRPPATH_PROCESS(_Where_) DBG_IRPPATH((DBG_PREFIX "IrpPath: + Processing IRP %08x in " _Where_, (char*)Irp)) |
Debug IRPPATH: Processing of the IRP. | |
#define | DBG_IRPPATH_COMPLETE(_Where_) DBG_IRPPATH((DBG_PREFIX "IrpPath: - Completing IRP %08x in " _Where_ " with ntStatus = %s", (char*)Irp, (char*)DebugNtStatus(ntStatus))) |
Debug IRPPATH: Completing of the IRP. | |
#define | DBG_IRPPATH_CANCEL(_Where_) DBG_IRPPATH((DBG_PREFIX "IrpPath: - CANCELLING IRP %08x in " _Where_, (char*)Irp)) |
Debug IRPPATH: Cancelling of the IRP. | |
#define | DBG_IRPPATH_EXECUTE(_Where_) DBG_IRPPATH((DBG_PREFIX "IrpPath: = Executing IRP %08x in " _Where_, (char*)Irp)) |
Debug IRPPATH: Executing of the IRP. | |
Functions | |
void | dbg_memdump (const char *Where, const unsigned char *InputBuffer, const unsigned int Count) |
output a memory dump to the debugging system More... | |
void | DbgOutputIntoBuffer (unsigned long BufferNumber, const char *const Format,...) |
Append something to the DebugBuffer. More... | |
void | cbm_get_debugging_flags (const char *ModuleName) |
Set the debugging flags. More... | |
Variables | |
unsigned char | DbgBuffer [DBG_MAX_BUFFER][DBG_MAX_BUFFERLEN] |
int | DbgBufferPos [] |
unsigned long | DbgFlags |
#define _DBG_END | ( | ) | DbgOutputIntoBuffer(DBG_PREFIX "\n"); _DBG_PERFORM(&DbgBuffer[DEBUG_BUFFER_NO][0]) _DBG_END_ADD |
#define _DBG_END_ADD |
#define _DBG_PERFORM | ( | _xxx | ) | OutputDebugString(_xxx); |
#define _DBG_START | ( | ) | _DBG_START_ADD DbgBufferPos[DEBUG_BUFFER_NO] = 0; DbgOutputIntoBuffer(DBG_PREFIX "%s," __FUNCTION__ "(%u): ", DBG_PROGNAME, __LINE__) |
#define _DBG_START_ADD |
#define _DBGO | ( | _xxx | ) | DbgOutputIntoBuffer _xxx |
#define DBG_ASSERT | ( | _xxx | ) | { if (!(_xxx)) if (ISDBG_ASSERT()) { DBGO(( DBG_PREFIX "***ASSERTION FAILED!***: %s in %s:%s(%u)", #_xxx, __FILE__, __FUNCTION__, __LINE__ )); DBG_BREAKPOINT(); } DBG_I_ASSUME(_xxx); } |
Output if DBGF_ASSERT is defined
Definition at line 401 of file debug.h.
Referenced by cbm_device_status(), cbm_driver_install(), cbm_execute_close(), cbm_execute_createopen(), cbm_execute_devicecontrol(), cbm_execute_readwrite(), cbm_identify_xp1541(), cbm_init_registry(), cbm_lock_parport(), cbm_readwrite(), cbm_registry_open_hardwarekey(), cbm_start_thread(), cbm_startio(), cbm_stop_thread(), cbm_unlock_parport(), cbm_upload(), cbmiec_block_irq(), cbmiec_check_device(), cbmiec_i_raw_read(), cbmiec_i_raw_write(), cbmiec_iec_setrelease(), cbmiec_release_irq(), cbmiec_show_port(), cbmiec_show_state(), cbmiec_test_irq(), cbmiec_wait_for_listener(), CbmOpenDeviceRegistryKey(), CbmParportRestart(), DllMain(), DriverUnload(), gcr_4_to_5_encode(), gcr_5_to_4_decode(), LogError(), opencbm_plugin_driver_close(), opencbm_plugin_driver_open(), opencbm_plugin_install_process_commandline(), ParPortAllocate(), ParPortAllocInterrupt(), ParPortAllowInterruptIoctl(), ParPortEnumerate(), ParPortEnumerateClose(), ParPortFree(), ParPortFreeInterrupt(), ParPortInit(), PluginListFree(), QueueCompleteIrp(), QueuePoll(), QueueStall(), QueueStartPacket(), QueueUnstall(), RegGetDWORD(), VDDInitialize(), WaitForIoCompletion(), WaitForIoCompletionConstruct(), and WaitForIoCompletionInit().
#define DBG_BREAKPOINT | ( | ) | { if (ISDBG_BREAK()) { DBG_I_BREAKPOINT(); }; } |
#define DBG_ERROR | ( | _xxx | ) | { if (ISDBG_ERROR()) { _DBG_START(); _DBGO(( DBG_PREFIX "***ERROR***: ")); _DBGO( _xxx ); _DBG_END(); } } |
Output if DBGF_ERROR is defined
Definition at line 397 of file debug.h.
Referenced by AddDevice(), AddDeviceCommonInit(), cbm_createopenclose(), cbm_devicecontrol(), cbm_driver_install(), cbm_driver_start(), cbm_driver_stop(), cbm_execute_devicecontrol(), cbm_execute_readwrite(), cbm_ioctl(), cbm_start_thread(), cbm_startio(), cbmiec_checkcable(), cbmiec_i_raw_read(), cbmiec_i_raw_write(), cbmiec_test_irq(), CbmInstall(), CbmParportRestart(), CbmRemove(), DllMain(), IsDriverStartedAutomatically(), opencbm_plugin_install_do_install(), RegGetDWORD(), and VDDDispatch().
#define DBG_I_ASSUME | ( | _x | ) |
#define DBG_I_BREAKPOINT | ( | ) |
#define DBG_MEMDUMP | ( | _Where, | |
_Buffer, | |||
_Count | |||
) | dbg_memdump(_Where, _Buffer, _Count) |
output a memory dump to the debugging system
Generates a byte dump and outputs it to the debugging system
_Where | Some text to output in front of the memory dump. This text can be used to identify where this dump occurred. |
_Buffer | Pointer to a buffer which contains the data bytes to be dumped. |
_Count | The size of the buffer to be dumped. |
Definition at line 105 of file debug.h.
Referenced by cbm_raw_read(), and cbm_raw_write().
#define DBG_PANIC | ( | _xxx | ) | { if (ISDBG_PANIC()) { _DBG_START(); _DBGO(( DBG_PREFIX "***PANIC***: ")); _DBGO( _xxx ); _DBG_END(); } } |
#define DBG_PPORT | ( | _xxx | ) | { if (ISDBG_PPORT()){ DBGO( _xxx ); } } |
Output if DBGF_PPORT is defined
Definition at line 391 of file debug.h.
Referenced by cbmiec_interrupt(), ParPortInit(), ParPortSetModeWdm(), and ParPortUnsetModeWdm().
#define DBG_PREFIX DEBUG_BUFFER_NO, |
The prefix which has to be used to any call of DbgOutputIntoBuffer(), _DBGO(), and the various other DBG_xxx functions.
Definition at line 320 of file debug.h.
Referenced by AddDevice(), AddDeviceCommonInit(), cbm_createopenclose(), cbm_devicecontrol(), cbm_driver_install(), cbm_driver_open_ex(), cbm_driver_start(), cbm_driver_stop(), cbm_execute_createopen(), cbm_execute_devicecontrol(), cbm_execute_readwrite(), cbm_get_debugging_flags(), cbm_get_driver_name_ex(), cbm_identify_xp1541(), cbm_ioctl(), cbm_lock(), cbm_lock_parport(), cbm_open(), cbm_registry_open_for_read(), cbm_registry_read_ulong(), cbm_registry_write_ulong(), cbm_start_thread(), cbm_startio(), cbm_unlock(), cbm_unlock_parport(), CbmCheckDriver(), cbmiec_checkcable(), cbmiec_close(), cbmiec_i_pp_read_debounced(), cbmiec_i_raw_read(), cbmiec_i_raw_write(), cbmiec_iec_dbg_read(), cbmiec_iec_dbg_write(), cbmiec_iec_setrelease(), cbmiec_iec_wait(), cbmiec_interrupt(), cbmiec_listen(), cbmiec_open(), cbmiec_parallel_burst_read_track(), cbmiec_parallel_burst_read_track_var(), cbmiec_pp_write(), cbmiec_raw_read(), cbmiec_raw_write(), cbmiec_reset(), cbmiec_send_byte(), cbmiec_show_port(), cbmiec_show_state(), cbmiec_talk(), cbmiec_test_irq(), cbmiec_wait_for_drives_ready(), cbmiec_wait_for_listener(), CbmInstall(), CbmParportRestart(), CbmRemove(), dbg_memdump(), DbgRp(), DbgWp(), DllMain(), DriverEntry(), gcr_4_to_5_encode(), gcr_5_to_4_decode(), get_all_installed_plugins(), IsDriverStartedAutomatically(), main(), opencbm_plugin_get_all_plugin_names(), opencbm_plugin_install_do_install(), opencbm_plugin_install_do_uninstall(), opencbm_plugin_install_plugin_data(), opencbm_plugin_parallel_burst_read_track(), opencbm_plugin_parallel_burst_read_track_var(), opencbm_plugin_parallel_burst_write_track(), ParPortAllocInterrupt(), ParPortEnumerateOpen(), ParPortInit(), ParPortSetModeNt4(), ParPortSetModeWdm(), ParPortUnsetModeNt4(), ParPortUnsetModeWdm(), plugin_is_active(), RegGetDWORD(), vdd_uninstall_iohook(), VDDDispatch(), and VDDInitialize().
#define DBG_PRINT | ( | _xxx | ) | { DBGO( _xxx ); } |
Output always
Definition at line 403 of file debug.h.
Referenced by cbm_driver_open_ex(), cbm_execute_createopen(), cbm_get_driver_name_ex(), cbm_identify_xp1541(), cbm_lock(), cbm_lock_parport(), cbm_unlock(), cbm_unlock_parport(), CbmCheckDriver(), cbmiec_i_pp_read_debounced(), cbmiec_iec_dbg_read(), cbmiec_iec_dbg_write(), cbmiec_parallel_burst_read_track(), cbmiec_parallel_burst_read_track_var(), cbmiec_wait_for_drives_ready(), dbg_memdump(), DriverEntry(), get_all_installed_plugins(), main(), opencbm_plugin_get_all_plugin_names(), opencbm_plugin_install_do_install(), opencbm_plugin_install_do_uninstall(), opencbm_plugin_install_plugin_data(), ParPortSetModeNt4(), ParPortUnsetModeNt4(), vdd_uninstall_iohook(), and VDDInitialize().
#define DBG_SUCCESS | ( | _xxx | ) | { if (ISDBG_SUCCESS()) { _DBG_START(); _DBGO( _xxx ); _DBGO((DBG_PREFIX " SUCCESS")); _DBG_END(); } } |
Output if DBGF_SUCCESS is defined
Definition at line 393 of file debug.h.
Referenced by cbm_driver_start(), cbm_driver_stop(), cbmiec_checkcable(), cbmiec_i_raw_read(), cbmiec_i_raw_write(), cbmiec_reset(), cbmiec_send_byte(), cbmiec_show_state(), cbmiec_wait_for_listener(), CbmInstall(), CbmParportRestart(), CbmRemove(), DriverEntry(), and RegGetDWORD().
#define DBG_VERIFY | ( | _xxx | ) | DBG_ASSERT( _xxx ) |
Similar to DBG_ASSERT(). However, the argument is executed even on release builds.
Definition at line 406 of file debug.h.
Referenced by cbmiec_wait_for_listener().
#define DBG_WARN | ( | _xxx | ) | { if (ISDBG_WARN()) { _DBG_START(); _DBGO(( DBG_PREFIX "Warning: ")); _DBGO( _xxx ); _DBG_END(); } } |
Output if DBGF_WARN is defined
Definition at line 395 of file debug.h.
Referenced by cbm_driver_start(), cbm_get_debugging_flags(), cbm_ioctl(), cbm_open(), CbmInstall(), gcr_4_to_5_encode(), gcr_5_to_4_decode(), IsDriverStartedAutomatically(), opencbm_plugin_parallel_burst_read_track(), opencbm_plugin_parallel_burst_read_track_var(), opencbm_plugin_parallel_burst_write_track(), ParPortAllocInterrupt(), ParPortEnumerateOpen(), ParPortInit(), and plugin_is_active().
#define DBGDO | ( | _xxx | ) | _xxx |
only execute the command when debugging is compiled in
Definition at line 409 of file debug.h.
Referenced by cbmiec_block_irq(), cbmiec_release_irq(), cbmiec_wait_for_listener(), CbmParportRestart(), DriverCommonUninit(), and ParPortEnumerateClose().
#define DBGF_BREAK 0x80000000 |
#define DBGF_ENTER 0x40000000 |
#define DBGF_LEAVE 0x20000000 |
#define DBGF_LEAVE_FAILURE 0x10000000 |
#define DBGF_PARAM 0x08000000 |
#define DBGF_PPORT 0x0010 |
#define DBGF_SUCCESS 0x0008 |
#define DBGO | ( | _xxx | ) | { _DBG_START(); _DBGO(_xxx); _DBG_END() } |
#define DEBUG_BUFFER_NO 0 |
#define FUNC_DEF |
What has to be defined at the start of each function?
Definition at line 302 of file debug.h.
Referenced by cbmiec_show_port(), cbmiec_show_state(), DbgRp(), and DbgWp().
#define FUNC_ENTER | ( | ) | FUNC_DEF { if (ISDBG_ENTER()) { DBGO(( DBG_PREFIX "Entering %s", __FUNCTION__ )); } } |
enter a function
Definition at line 347 of file debug.h.
Referenced by AddDevice(), AddDeviceCommonInit(), cbm_cleanup(), cbm_clear_eoi(), cbm_close(), cbm_createopenclose(), cbm_dbg_readbuffer(), cbm_device_status(), cbm_devicecontrol(), cbm_driver_close(), cbm_driver_install(), cbm_driver_open(), cbm_driver_open_ex(), cbm_driver_start(), cbm_driver_stop(), cbm_exec_command(), cbm_execute_close(), cbm_execute_createopen(), cbm_execute_devicecontrol(), cbm_execute_readwrite(), cbm_get_debugging_buffer(), cbm_get_debugging_flags(), cbm_get_driver_name(), cbm_get_driver_name_ex(), cbm_get_eoi(), cbm_get_plugin_function_address(), cbm_identify(), cbm_identify_xp1541(), cbm_iec_dbg_read(), cbm_iec_dbg_write(), cbm_iec_get(), cbm_iec_poll(), cbm_iec_release(), cbm_iec_set(), cbm_iec_setrelease(), cbm_iec_wait(), cbm_init_registry(), cbm_initialize_cable_deferred(), cbm_install(), cbm_ioctl(), cbm_listen(), cbm_lock(), cbm_lock_parport(), cbm_open(), cbm_parallel_burst_read(), cbm_parallel_burst_read_track(), cbm_parallel_burst_read_track_var(), cbm_parallel_burst_write(), cbm_parallel_burst_write_track(), cbm_pp_read(), cbm_pp_write(), cbm_raw_read(), cbm_raw_write(), cbm_readwrite(), cbm_registry_close(), cbm_registry_close_hardwarekey(), cbm_registry_open_for_read(), cbm_registry_open_hardwarekey(), cbm_registry_read_ulong(), cbm_registry_write_ulong(), cbm_reset(), cbm_srq_burst_read(), cbm_srq_burst_read_track(), cbm_srq_burst_write(), cbm_srq_burst_write_track(), cbm_start_thread(), cbm_startio(), cbm_stop_thread(), cbm_talk(), cbm_tap_download_config(), cbm_tap_get_sense(), cbm_tap_get_ver(), cbm_tap_motor_off(), cbm_tap_motor_on(), cbm_tap_prepare_capture(), cbm_tap_prepare_write(), cbm_tap_start_capture(), cbm_tap_start_write(), cbm_tap_upload_config(), cbm_tap_wait_for_play_sense(), cbm_tap_wait_for_stop_sense(), cbm_thread(), cbm_unlisten(), cbm_unlock(), cbm_unlock_parport(), cbm_untalk(), cbm_upload(), CbmCheckDriver(), CbmCheckPresence(), cbmiec_block_irq(), cbmiec_check_device(), cbmiec_checkcable(), cbmiec_cleanup(), cbmiec_clear_eoi(), cbmiec_close(), cbmiec_get_eoi(), cbmiec_global_init(), cbmiec_i_pp_read_debounced(), cbmiec_i_raw_read(), cbmiec_i_raw_write(), cbmiec_iec_dbg_read(), cbmiec_iec_dbg_write(), cbmiec_iec_poll(), cbmiec_iec_release(), cbmiec_iec_set(), cbmiec_iec_setrelease(), cbmiec_iec_wait(), cbmiec_init(), cbmiec_interrupt(), cbmiec_listen(), cbmiec_open(), cbmiec_parallel_burst_read(), cbmiec_parallel_burst_read_track(), cbmiec_parallel_burst_read_track_var(), cbmiec_parallel_burst_write(), cbmiec_pp_read(), cbmiec_pp_write(), cbmiec_raw_read(), cbmiec_raw_write(), cbmiec_release_bus(), cbmiec_release_irq(), cbmiec_reset(), cbmiec_schedule_timeout(), cbmiec_send_byte(), cbmiec_set_cabletype(), cbmiec_setcablestate(), cbmiec_talk(), cbmiec_test_irq(), cbmiec_udelay(), cbmiec_unlisten(), cbmiec_untalk(), cbmiec_wait_for_drives_ready(), cbmiec_wait_for_listener(), CbmInstall(), CbmOpenDeviceRegistryKey(), CbmParportRestart(), CbmRemove(), CbmUpdateParameter(), DllMain(), DriverCommonInit(), DriverCommonUninit(), DriverEntry(), DriverUnload(), gcr_4_to_5_encode(), gcr_5_to_4_decode(), get_all_installed_plugins(), get_all_plugins(), IsDriverStartedAutomatically(), LoadLocalOpenCBMDll(), LogError(), main(), opencbm_plugin_clear_eoi(), opencbm_plugin_close(), opencbm_plugin_driver_close(), opencbm_plugin_driver_open(), opencbm_plugin_get_all_plugin_names(), opencbm_plugin_get_driver_name(), opencbm_plugin_get_eoi(), opencbm_plugin_iec_dbg_read(), opencbm_plugin_iec_dbg_write(), opencbm_plugin_iec_poll(), opencbm_plugin_iec_release(), opencbm_plugin_iec_set(), opencbm_plugin_iec_setrelease(), opencbm_plugin_iec_wait(), opencbm_plugin_install_do_install(), opencbm_plugin_install_do_uninstall(), opencbm_plugin_install_generic(), opencbm_plugin_install_get_needed_files(), opencbm_plugin_install_plugin_data(), opencbm_plugin_install_process_commandline(), opencbm_plugin_listen(), opencbm_plugin_lock(), opencbm_plugin_open(), opencbm_plugin_parallel_burst_read(), opencbm_plugin_parallel_burst_read_track(), opencbm_plugin_parallel_burst_read_track_var(), opencbm_plugin_parallel_burst_write(), opencbm_plugin_parallel_burst_write_track(), opencbm_plugin_pp_read(), opencbm_plugin_pp_write(), opencbm_plugin_raw_read(), opencbm_plugin_raw_write(), opencbm_plugin_reset(), opencbm_plugin_talk(), opencbm_plugin_unlisten(), opencbm_plugin_unlock(), opencbm_plugin_untalk(), ParPortAllocate(), ParPortAllocInterrupt(), ParPortAllowInterruptIoctl(), ParPortDeinit(), ParPortEnumerate(), ParPortEnumerateClose(), ParPortEnumerateOpen(), ParPortFree(), ParPortFreeInterrupt(), ParPortInit(), ParPortSetMode(), ParPortSetModeNt4(), ParPortSetModeWdm(), ParPortUnsetMode(), ParPortUnsetModeNt4(), ParPortUnsetModeWdm(), plugin_is_active(), plugin_set_active(), plugin_set_inactive(), PluginForAll(), PluginListFree(), ProcessPluginCommandlineAndAddIt(), QueueCleanup(), QueueCompleteIrp(), QueueInit(), QueueIsDropping(), QueueIsStalled(), QueuePoll(), QueueShouldCancelCurrentIrp(), QueueSignal(), QueueStall(), QueueStartPacket(), QueueUnstall(), RegGetDWORD(), vdd_clear_eoi(), vdd_close(), vdd_driver_close(), vdd_driver_open(), vdd_get_eoi(), vdd_identify_xp1541(), vdd_iec_get(), vdd_iec_poll(), vdd_iec_release(), vdd_iec_set(), vdd_iec_setrelease(), vdd_iec_wait(), vdd_install_iohook(), vdd_listen(), vdd_pp_read(), vdd_pp_write(), vdd_reset(), vdd_talk(), vdd_uninstall_iohook(), vdd_uninstall_iohook_internal(), vdd_unlisten(), vdd_untalk(), vdd_usleep(), VDDDispatch(), VDDInitialize(), VDDRegisterInit(), WaitForIoCompletion(), WaitForIoCompletionCancelAll(), WaitForIoCompletionConstruct(), WaitForIoCompletionDeinit(), and WaitForIoCompletionInit().
#define FUNC_LEAVE | ( | ) | { if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s", __FUNCTION__ )); } return; } |
leave the function
Definition at line 349 of file debug.h.
Referenced by cbm_driver_close(), cbm_get_debugging_flags(), cbm_iec_release(), cbm_iec_set(), cbm_iec_setrelease(), cbm_init_registry(), cbm_initialize_cable_deferred(), cbm_lock(), cbm_parallel_burst_write(), cbm_pp_write(), cbm_srq_burst_write(), cbm_stop_thread(), cbm_thread(), cbm_unlock(), cbmiec_block_irq(), cbmiec_release_bus(), cbmiec_release_irq(), cbmiec_schedule_timeout(), cbmiec_set_cabletype(), cbmiec_setcablestate(), cbmiec_udelay(), cbmiec_wait_for_listener(), CbmParportRestart(), DriverCommonUninit(), DriverUnload(), LogError(), opencbm_plugin_driver_close(), opencbm_plugin_iec_release(), opencbm_plugin_iec_set(), opencbm_plugin_iec_setrelease(), opencbm_plugin_lock(), opencbm_plugin_parallel_burst_write(), opencbm_plugin_pp_write(), opencbm_plugin_unlock(), ParPortEnumerateClose(), PluginListFree(), QueueInit(), QueueStall(), QueueUnstall(), VDDDispatch(), VDDRegisterInit(), WaitForIoCompletionCancelAll(), WaitForIoCompletionConstruct(), WaitForIoCompletionDeinit(), and WaitForIoCompletionInit().
#define FUNC_LEAVE_BOOL | ( | _xxx | ) | { const BOOL _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with BOOL=%s", __FUNCTION__, (_OUT_)?"TRUE":"FALSE" )); } return _OUT_; } |
leave the function with a return value of type BOOL
Definition at line 354 of file debug.h.
Referenced by cbm_driver_start(), cbm_driver_stop(), cbm_ioctl(), CbmCheckPresence(), CbmInstall(), CbmRemove(), CbmUpdateParameter(), DllMain(), get_all_installed_plugins(), get_all_plugins(), IsDriverStartedAutomatically(), opencbm_plugin_get_all_plugin_names(), opencbm_plugin_install_do_install(), opencbm_plugin_install_do_uninstall(), opencbm_plugin_install_generic(), opencbm_plugin_install_plugin_data(), PluginForAll(), ProcessPluginCommandlineAndAddIt(), VDDInitialize(), and WaitForIoCompletion().
#define FUNC_LEAVE_BOOLEAN | ( | _xxx | ) | { const BOOLEAN _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with BOOL=%s", __FUNCTION__, (_OUT_)?"TRUE":"FALSE" )); } return _OUT_; } |
leave the function with a return value of type BOOL
Definition at line 356 of file debug.h.
Referenced by cbmiec_send_byte(), QueueIsDropping(), QueueIsStalled(), QueueShouldCancelCurrentIrp(), vdd_clear_eoi(), vdd_close(), vdd_driver_close(), vdd_driver_open(), vdd_get_eoi(), vdd_identify_xp1541(), vdd_iec_get(), vdd_iec_poll(), vdd_iec_release(), vdd_iec_set(), vdd_iec_setrelease(), vdd_iec_wait(), vdd_install_iohook(), vdd_listen(), vdd_pp_read(), vdd_pp_write(), vdd_reset(), vdd_talk(), vdd_uninstall_iohook(), vdd_unlisten(), vdd_untalk(), and vdd_usleep().
#define FUNC_LEAVE_HANDLE | ( | _xxx | ) | { const HANDLE _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with HANDLE=%u", __FUNCTION__, (unsigned int)(_OUT_) )); } return _OUT_; } |
#define FUNC_LEAVE_HMODULE | ( | _xxx | ) | FUNC_LEAVE_TYPE( _xxx, HMODULE, "0x%08x") |
leave the function with a return value of a HMODULE
Definition at line 387 of file debug.h.
Referenced by LoadLocalOpenCBMDll().
#define FUNC_LEAVE_INT | ( | _xxx | ) | { const int _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with INT=%u (%d)", __FUNCTION__, (unsigned int)(_OUT_), (signed int)(_OUT_) )); } return _OUT_; } |
leave the function with a return value of type INT
Definition at line 358 of file debug.h.
Referenced by cbm_clear_eoi(), cbm_close(), cbm_device_status(), cbm_driver_install(), cbm_driver_open(), cbm_driver_open_ex(), cbm_exec_command(), cbm_get_debugging_buffer(), cbm_get_eoi(), cbm_identify(), cbm_identify_xp1541(), cbm_iec_dbg_read(), cbm_iec_dbg_write(), cbm_iec_get(), cbm_iec_poll(), cbm_iec_wait(), cbm_listen(), cbm_open(), cbm_parallel_burst_read_track(), cbm_parallel_burst_read_track_var(), cbm_parallel_burst_write_track(), cbm_raw_read(), cbm_raw_write(), cbm_reset(), cbm_srq_burst_read_track(), cbm_srq_burst_write_track(), cbm_talk(), cbm_tap_download_config(), cbm_tap_get_sense(), cbm_tap_get_ver(), cbm_tap_motor_off(), cbm_tap_motor_on(), cbm_tap_prepare_capture(), cbm_tap_prepare_write(), cbm_tap_start_capture(), cbm_tap_start_write(), cbm_tap_upload_config(), cbm_tap_wait_for_play_sense(), cbm_tap_wait_for_stop_sense(), cbm_unlisten(), cbm_untalk(), cbm_upload(), CbmCheckDriver(), gcr_4_to_5_encode(), gcr_5_to_4_decode(), main(), opencbm_plugin_clear_eoi(), opencbm_plugin_close(), opencbm_plugin_driver_open(), opencbm_plugin_get_eoi(), opencbm_plugin_iec_dbg_read(), opencbm_plugin_iec_dbg_write(), opencbm_plugin_iec_poll(), opencbm_plugin_iec_wait(), opencbm_plugin_listen(), opencbm_plugin_open(), opencbm_plugin_parallel_burst_read_track(), opencbm_plugin_parallel_burst_read_track_var(), opencbm_plugin_parallel_burst_write_track(), opencbm_plugin_raw_read(), opencbm_plugin_raw_write(), opencbm_plugin_reset(), opencbm_plugin_talk(), opencbm_plugin_unlisten(), opencbm_plugin_untalk(), plugin_is_active(), plugin_set_active(), plugin_set_inactive(), and RegGetDWORD().
#define FUNC_LEAVE_LONG | ( | _xxx | ) | { const LONG _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with LONG=%l", __FUNCTION__, (LONG) (_OUT_) )); } return _OUT_; } |
leave the function with a return value of type ULONG
Definition at line 372 of file debug.h.
Referenced by cbmiec_i_pp_read_debounced().
#define FUNC_LEAVE_PTR | ( | _xxx, | |
_TYPE | |||
) | FUNC_LEAVE_TYPE( _xxx, _TYPE, "0x%p") |
leave the function with a return value of a pointer type
Definition at line 376 of file debug.h.
Referenced by cbm_get_plugin_function_address().
#define FUNC_LEAVE_STRING | ( | _xxx | ) | { const char * _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with '%s'", __FUNCTION__, (_OUT_) )); } return _xxx; } |
leave the function with a return value of type STRING
Definition at line 368 of file debug.h.
Referenced by cbm_get_driver_name(), cbm_get_driver_name_ex(), and opencbm_plugin_get_driver_name().
#define FUNC_LEAVE_TYPE | ( | _xxx, | |
_TYPE, | |||
_FORMAT | |||
) | { _TYPE _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with " #_TYPE "=" _FORMAT, __FUNCTION__, (_OUT_) )); } return _OUT_; } |
#define FUNC_LEAVE_UCHAR | ( | _xxx | ) | { const UCHAR _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with UCHAR=%u", __FUNCTION__, (unsigned int)(_OUT_) )); } return _OUT_; } |
leave the function with a return value of type UCHAR
Definition at line 364 of file debug.h.
Referenced by cbm_parallel_burst_read(), cbm_pp_read(), cbm_srq_burst_read(), opencbm_plugin_parallel_burst_read(), and opencbm_plugin_pp_read().
#define FUNC_LEAVE_UINT | ( | _xxx | ) | { const unsigned int _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with INT=%u (%d)", __FUNCTION__, _OUT_, _OUT_ )); } return _OUT_; } |
leave the function with a return value of type INT
Definition at line 360 of file debug.h.
Referenced by opencbm_plugin_install_get_needed_files(), and opencbm_plugin_install_process_commandline().
#define FUNC_LEAVE_ULONG | ( | _xxx | ) | { const ULONG _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with ULONG=%ul", __FUNCTION__, (ULONG) (_OUT_) )); } return _OUT_; } |
#define FUNC_LEAVE_USHORT | ( | _xxx | ) | { const USHORT _OUT_ = _xxx; if (ISDBG_LEAVE()) { DBGO(( DBG_PREFIX "Leaving %s with INT=%u (%d)", __FUNCTION__, (unsigned int)(_OUT_), (signed int)(_OUT_) )); } return _OUT_; } |
leave the function with a return value of type INT
Definition at line 362 of file debug.h.
Referenced by vdd_uninstall_iohook_internal().
#define FUNC_PARAM | ( | _xxx | ) | { if (ISDBG_PARAM()) { _DBG_START(); _DBGO(( DBG_PREFIX "Parameter for %s: ", __FUNCTION__ )); _DBGO( _xxx ); _DBG_END() } } |
output the parameters of the function
Definition at line 351 of file debug.h.
Referenced by cbm_registry_open_for_read(), cbm_registry_read_ulong(), cbm_registry_write_ulong(), cbmiec_close(), cbmiec_iec_setrelease(), cbmiec_iec_wait(), cbmiec_listen(), cbmiec_open(), cbmiec_pp_write(), cbmiec_raw_read(), cbmiec_raw_write(), cbmiec_talk(), and RegGetDWORD().
#define ISDBG_ASSERT | ( | ) | (DbgFlags & DBGF_ASSERT) |
#define ISDBG_BREAK | ( | ) | (DbgFlags & DBGF_BREAK) |
#define ISDBG_ENTER | ( | ) | (DbgFlags & DBGF_ENTER) |
#define ISDBG_ERROR | ( | ) | (DbgFlags & DBGF_ERROR) |
#define ISDBG_LEAVE | ( | ) | (DbgFlags & DBGF_LEAVE) |
#define ISDBG_LEAVE_FAILURE | ( | ) | (DbgFlags & (DBGF_LEAVE|DBGF_LEAVE_FAILURE)) |
#define ISDBG_PANIC | ( | ) | (1) |
#define ISDBG_PARAM | ( | ) | (DbgFlags & DBGF_PARAM) |
#define ISDBG_PPORT | ( | ) | (DbgFlags & DBGF_PPORT) |
#define ISDBG_SUCCESS | ( | ) | (DbgFlags & DBGF_SUCCESS) |
#define ISDBG_WARN | ( | ) | (DbgFlags & DBGF_WARNING) |
void cbm_get_debugging_flags | ( | const char * | ModuleName | ) |
Set the debugging flags.
This function gets the debugging flags from the registry. If there are any, it sets the flags to that value.
Definition at line 97 of file registry.c.
References CBM_REGKEY_SERVICE, CBM_REGKEY_SERVICE_DLL_DEBUGFLAGS, cbmlibmisc_strcat(), cbmlibmisc_strdup(), cbmlibmisc_strfree(), DBG_PREFIX, DBG_WARN, DbgFlags, FUNC_ENTER, FUNC_LEAVE, and RegGetDWORD().
Referenced by DllMain().
void dbg_memdump | ( | const char * | Where, |
const unsigned char * | InputBuffer, | ||
const unsigned int | Count | ||
) |
output a memory dump to the debugging system
Generates a byte dump and outputs it to the debugging system
Where | Some text to output in front of the memory dump. This text can be used to identify where this dump occurred. |
InputBuffer | Pointer to a buffer which contains the data bytes to be dumped. |
Count | The size of the buffer to be dumped. |
Definition at line 64 of file dbghelp.c.
References DBG_PREFIX, and DBG_PRINT.
void DbgOutputIntoBuffer | ( | unsigned long | BufferNumber, |
const char *const | Format, | ||
... | |||
) |
Append something to the DebugBuffer.
This function appends a string to the DebugBuffer. It can be used with a format-string like printf().
BufferNumber | The number of the DebugBuffer in which the content is to be written. |
Format | A printf()-style format specifier |
... | The variables which are used as parameters for the printf() style format specifier. |
Definition at line 91 of file arch/windows/debug.c.
References DBG_MAX_BUFFERLEN, DbgBuffer, and DbgBufferPos.
unsigned char DbgBuffer[DBG_MAX_BUFFER][DBG_MAX_BUFFERLEN] |
Buffers where the debug string will be build up before it is send to the system (or into memory)
Definition at line 26 of file arch/windows/debug.c.
Referenced by DbgOutputIntoBuffer().
int DbgBufferPos[] |
Index into the DbgBuffer buffers, for each one one index
Definition at line 29 of file arch/windows/debug.c.
Referenced by DbgOutputIntoBuffer().
unsigned long DbgFlags |
initialize debugging flags
Definition at line 32 of file arch/windows/debug.c.
Referenced by cbm_get_debugging_flags(), cbm_init_registry(), cbm_isr(), and cbmiec_test_irq().