; --------------------------------------------------------------------------------------------; Copyright (c) Fantaisie Software. All rights reserved.; Dual licensed under the GPL and Fantaisie Software licenses.; See LICENSE and LICENSE-FANTAISIE in the project root for license information.; --------------------------------------------------------------------------------------------CompilerIf #DEBUG; This might also work on linux... to check;CompilerIf #CompileMac; NOTE: For this to work, you have to enable the bad malloc traping with an environmentvariable.; SetEnvironmentVariable() has no affect, probably because it must be done before program start.;; Use this before program start:; export MallocBadFreeAbort=1;Prototype PB_DEBUGGER_Error(Control, *Message)DisableDebugger ; important to preserve the line numbers!!Procedure GetDebuggerErrorFunction()CompilerIf #PB_Compiler_Processor = #PB_Processor_x64;!extern _PB_DEBUGGER_Error;!MOV rax,_PB_DEBUGGER_ErrorCompilerEndIfCompilerIf #PB_Compiler_Processor = #PB_Processor_x86!extern _PB_DEBUGGER_Error!MOV eax,_PB_DEBUGGER_ErrorCompilerEndIfCompilerIf #PB_Compiler_Processor = #PB_Processor_PowerPC!.globl _PB_DEBUGGER_Error! lwa r3,_PB_DEBUGGER_ErrorCompilerEndIfProcedureReturnEndProcedureProcedureC abort_signal(signum.l)PB_DEBUGGER_Error.PB_DEBUGGER_Error = GetDebuggerErrorFunction(); Mark this error as non-continuable;PB_DEBUGGER_Error(6, @"free() for a not malloc()'ed Memory!")EndProcedureEnableDebugger#SIGABRT = 6; setup the signal handler to catch the signal generated by the above set environment optionsignal_(#SIGABRT, @abort_signal())CompilerEndIfCompilerEndIf
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。