SCP: Add file:line context reporting when abort() is invoked from macros

This commit is contained in:
Mark Pizzolato 2018-08-08 10:00:53 -07:00
parent 6dad94c5e5
commit 44bc5116e7
2 changed files with 4 additions and 3 deletions

View file

@ -91,7 +91,7 @@ if not exist ../../windows-build goto _notice1
if not exist ../../windows-build/lib goto _notice2
set _X_WINDOWS_BUILD=
for /F "usebackq tokens=2" %%i in (`findstr /C:"WINDOWS-BUILD" ..\..\windows-build\Windows-Build_Versions.txt`) do SET _X_WINDOWS_BUILD=%%i
if "%_X_WINDOWS_BUILD%" LSS "20180806" goto _notice2
if "%_X_WINDOWS_BUILD%" LSS "20180808" goto _notice2
set _X_WINDOWS_BUILD=
if not exist ../../windows-build/lib/VisualCVersionSupport.txt goto _find_vc_support

View file

@ -1099,7 +1099,8 @@ extern int32 sim_asynch_inst_latency;
sim_debug (SIM_DBG_EVENT, sim_dflt_dev, "Queue Corruption detected\n");\
fclose(sim_deb); \
} \
sim_printf("Queue Corruption detected\n"); \
sim_printf("Queue Corruption detected in %s line %d\n",\
__FILE__, __LINE); \
abort(); \
} \
if (lock) \
@ -1255,7 +1256,7 @@ extern int32 sim_asynch_inst_latency;
return SCPE_OK; \
} else (void)0
#endif /* USE_AIO_INTRINSICS */
#define AIO_VALIDATE if (!pthread_equal ( pthread_self(), sim_asynch_main_threadid )) {sim_printf("Improper thread context for operation\n"); abort();}
#define AIO_VALIDATE if (!pthread_equal ( pthread_self(), sim_asynch_main_threadid )) {sim_printf("Improper thread context for operation in %s line %d\n", __FILE__, __LINE__); abort();}
#define AIO_CHECK_EVENT \
if (0 > --sim_asynch_check) { \
AIO_UPDATE_QUEUE; \