Closed
Bug 37240
Opened 26 years ago
Closed 26 years ago
add DebugBreak support for OS/2
Categories
(NSPR :: NSPR, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
4.0.2
People
(Reporter: snizinsk, Assigned: wtc)
Details
Attachments
(1 file)
|
2.20 KB,
patch
|
Details | Diff | Splinter Review |
Changing prlog.c to add DebugBreak() support for OS/2. Here's the diff:
Index: prlog.c
===================================================================
RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/prlog.c,v
retrieving revision 3.14
diff -p -r3.14 prlog.c
*** prlog.c 1999/11/15 21:59:52 3.14
--- prlog.c 2000/04/26 17:06:58
***************
*** 14,19 ****
--- 14,28 ----
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
+ *
+ * Contributors:
+ *
+ * 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
*/
#include "primpl.h"
***************
*** 21,26 ****
--- 30,55 ----
#include "prprf.h"
#include <string.h>
+ #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 */
+
/*
* Lock used to lock the log.
*
*************** PR_IMPLEMENT(void) PR_Assert(const char
*** 441,447 ****
#ifdef XP_MAC
dprintf("Assertion failure: %s, at %s:%d\n", s, file, ln);
#endif
! #ifdef WIN32
DebugBreak();
#endif
#ifndef XP_MAC
--- 470,476 ----
#ifdef XP_MAC
dprintf("Assertion failure: %s, at %s:%d\n", s, file, ln);
#endif
! #if defined(WIN32) || defined(XP_OS2)
DebugBreak();
#endif
#ifndef XP_MAC
| Assignee | ||
Comment 1•26 years ago
|
||
Question: will doing the int3 for Visual Age
allow someone to ignore the subsequent abort()
and continue execution? That would be bad.
PR_ASSERT() may break into the debugger, but
it must terminate the execution of the program.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•26 years ago
|
||
Do you want this checked in right away, or
can this wait until NSPR 4.1?
The int 3 throws you into the debugger on VisualAge. If you try to continue
(without changing the current intstruction pointer), you will fall through and
do the abort().
When is 4.1? We'd like to have this fix in the tree before M16 comes out.
Thanks.
| Assignee | ||
Comment 4•26 years ago
|
||
| Assignee | ||
Comment 5•26 years ago
|
||
Checked in patch 8028 on the main trunk.
/cvsroot/mozilla/nsprpub/pr/src/io/prlog.c, revision 3.16
On the NSPRPUB_RELEASE_4_0_BRANCH.
/cvsroot/mozilla/nsprpub/pr/src/io/prlog.c, revision 3.14.10.2
Will check in the patch on the NSPRPUB_CLIENT_BRANCH,
which the SeaMonkey build pulls, when the SeaMonkey
tree opens.
Target Milestone: --- → 4.0.1
| Assignee | ||
Comment 6•26 years ago
|
||
I checked in the patch on the NSPRPUB_CLIENT_BRANCH.
/cvsroot/mozilla/nsprpub/pr/src/io/prlog.c, revision 3.14.24.2
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•26 years ago
|
Target Milestone: 4.0.1 → 4.0.2
You need to log in
before you can comment on or make changes to this bug.
Description
•