зеркало из https://github.com/mozilla/pjs.git
# 34082
r= rogerl OS/2 bring up continues - support for debugging asserts on OS/2
This commit is contained in:
Родитель
855e3273e4
Коммит
6d0ec2f2c9
|
@ -30,6 +30,13 @@
|
|||
* and other provisions required by the GPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this
|
||||
* file under either the NPL or the GPL.
|
||||
*
|
||||
* This Original Code has been modified by IBM Corporation. Modifications made by IBM
|
||||
* described herein are Copyright (c) International Business Machines Corporation, 2000.
|
||||
* Modifications to Mozilla code or documentation identified per MPL Section 3.3
|
||||
*
|
||||
* Date Modified by Description of modification
|
||||
* 04/10/2000 IBM Corp. Added DebugBreak() definitions for OS/2
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -50,6 +57,26 @@
|
|||
# include "jsprf.h"
|
||||
#endif
|
||||
|
||||
#if defined(XP_OS2) && defined(DEBUG)
|
||||
/* Added definitions for DebugBreak() for 2 different OS/2 compilers. Doing
|
||||
* the int3 on purpose for Visual Age so that a developer can step over the
|
||||
* instruction if so desired. Not always possible if trapping due to exception
|
||||
* handling IBM-AKR
|
||||
*/
|
||||
#if defined(XP_OS2_VACPP)
|
||||
#include <builtin.h>
|
||||
#define DebugBreak() { _interrupt(3); }
|
||||
#elif defined(XP_OS2_EMX)
|
||||
/* Force a trap */
|
||||
#define DebugBreak() { int *pTrap=NULL; *pTrap = 1; }
|
||||
#else
|
||||
#define DebugBreak()
|
||||
#endif
|
||||
|
||||
#elif defined(XP_OS2)
|
||||
#define DebugBreak()
|
||||
#endif /* XP_OS2 && DEBUG */
|
||||
|
||||
#ifdef XP_MAC
|
||||
/*
|
||||
* PStrFromCStr converts the source C string to a destination
|
||||
|
@ -139,7 +166,7 @@ JS_PUBLIC_API(void) JS_Assert(const char *s, const char *file, JSIntn ln)
|
|||
#ifdef XP_MAC
|
||||
dprintf("Assertion failure: %s, at %s:%d\n", s, file, ln);
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) || defined(XP_OS2)
|
||||
DebugBreak();
|
||||
#endif
|
||||
#ifndef XP_MAC
|
||||
|
|
Загрузка…
Ссылка в новой задаче