SCP: Expose _sim_vdebug for use by external libraries

This commit is contained in:
Mark Pizzolato 2021-09-06 09:58:41 -07:00
parent a615b89f11
commit d57b182701
2 changed files with 2 additions and 1 deletions

2
scp.c
View file

@ -13772,7 +13772,7 @@ return stat | ((stat != SCPE_OK) ? SCPE_NOMESSAGE : 0);
Callers should be calling sim_debug() which is a macro
defined in scp.h which evaluates the action condition before
incurring call overhead. */
static void _sim_vdebug (uint32 dbits, DEVICE* dptr, UNIT *uptr, const char* fmt, va_list arglist)
void _sim_vdebug (uint32 dbits, DEVICE* dptr, UNIT *uptr, const char* fmt, va_list arglist)
{
if (sim_deb && dptr && ((dptr->dctrl | (uptr ? uptr->dctrl : 0)) & dbits)) {
TMLN *saved_oline = sim_oline;

1
scp.h
View file

@ -259,6 +259,7 @@ void sim_debug_bits (uint32 dbits, DEVICE* dptr, BITFIELD* bitdefs,
#if defined (__DECC) && defined (__VMS) && (defined (__VAX) || (__DECC_VER < 60590001))
#define CANT_USE_MACRO_VA_ARGS 1
#endif
void _sim_vdebug (uint32 dbits, DEVICE* dptr, UNIT *uptr, const char* fmt, va_list arglist);
#ifdef CANT_USE_MACRO_VA_ARGS
#define _sim_debug_device sim_debug
void sim_debug (uint32 dbits, DEVICE* dptr, const char *fmt, ...) GCC_FMT_ATTR(3, 4);