[omniORB] Update on using SUN C++ 5.0
Sai-Lai Lo
S.Lo@uk.research.att.com
20 Sep 1999 16:49:04 +0100
--=-=-=
I just tried the compiler with the latest patch (107311-06). Nothing
exciting to report except that omniidl2 can be compiled without -g with the
patch below and it runs without core dumping.
The sad news is if you don't compile with -g, all the examples just core
dump when an exception is thrown from the runtime. The stack trace
indicates that the exception unwinding is faulting. I wonder if our
installation somehow got an out-of-date C++ runtime. If you build
omniORB 2.8.0pre2 with the following patch applied and without -g and got
the examples to run, please let me know.
The patch actually contains a workaround to stop SUN CC die during
compilation.
Sai-Lai
--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=sun_cc_patch
*** omniORB_280pre2/src/tool/omniidl2/include/ast_decl.hh Mon May 17 14:30:43 1999
--- new/src/tool/omniidl2/include/ast_decl.hh Mon Sep 20 16:24:26 1999
***************
*** 97,103 ****
DEF_NARROW_METHODS0(COMMON_Base);
};
! class AST_Decl : public virtual COMMON_Base
{
public:
// Enum defining the different kinds of AST nodes
--- 97,112 ----
DEF_NARROW_METHODS0(COMMON_Base);
};
!
! #if !defined(__SUNPRO_CC) || __SUNPRO_CC < 0x500
! #define COMMON_BASE_HACK : public virtual COMMON_Base
! #else
! #define COMMON_BASE_HACK
! #endif
!
!
! class AST_Decl
! COMMON_BASE_HACK
{
public:
// Enum defining the different kinds of AST nodes
*** omniORB_280pre2/src/tool/omniidl2/include/utl_scope.hh Tue May 25 19:29:14 1999
--- new/src/tool/omniidl2/include/utl_scope.hh Mon Sep 20 16:24:51 1999
***************
*** 96,102 ****
// Forward declaration of active iterator for UTL_Scope
class UTL_ScopeActiveIterator;
! class UTL_Scope : public virtual COMMON_Base
{
public:
// Enum to denote the kind of iteration desired
--- 96,103 ----
// Forward declaration of active iterator for UTL_Scope
class UTL_ScopeActiveIterator;
! class UTL_Scope
! COMMON_BASE_HACK
{
public:
// Enum to denote the kind of iteration desired
*** omniORB_280pre2/src/lib/omniORB2/dynamic/dynException.cc Thu Jul 1 11:28:51 1999
--- new/src/lib/omniORB2/dynamic/dynException.cc Mon Sep 20 14:53:20 1999
***************
*** 552,595 ****
////////////// and insertToAnyFnNCP static variables /////
//////////////////////////////////////////////////////////////////////
class dynException_Singleton {
public:
! dynException_Singleton() {
#define STD_EXCEPTION(name) \
CORBA::name::insertToAnyFn = name##_insertToAny; \
! CORBA::name::insertToAnyFnNCP = name##_insertToAnyNCP;
! STD_EXCEPTION (UNKNOWN)
! STD_EXCEPTION (BAD_PARAM)
! STD_EXCEPTION (NO_MEMORY)
! STD_EXCEPTION (IMP_LIMIT)
! STD_EXCEPTION (COMM_FAILURE)
! STD_EXCEPTION (INV_OBJREF)
! STD_EXCEPTION (OBJECT_NOT_EXIST)
! STD_EXCEPTION (NO_PERMISSION)
! STD_EXCEPTION (INTERNAL)
! STD_EXCEPTION (MARSHAL)
! STD_EXCEPTION (INITIALIZE)
! STD_EXCEPTION (NO_IMPLEMENT)
! STD_EXCEPTION (BAD_TYPECODE)
! STD_EXCEPTION (BAD_OPERATION)
! STD_EXCEPTION (NO_RESOURCES)
! STD_EXCEPTION (NO_RESPONSE)
! STD_EXCEPTION (PERSIST_STORE)
! STD_EXCEPTION (BAD_INV_ORDER)
! STD_EXCEPTION (TRANSIENT)
! STD_EXCEPTION (FREE_MEM)
! STD_EXCEPTION (INV_IDENT)
! STD_EXCEPTION (INV_FLAG)
! STD_EXCEPTION (INTF_REPOS)
! STD_EXCEPTION (BAD_CONTEXT)
! STD_EXCEPTION (OBJ_ADAPTER)
! STD_EXCEPTION (DATA_CONVERSION)
! STD_EXCEPTION (TRANSACTION_REQUIRED)
! STD_EXCEPTION (TRANSACTION_ROLLEDBACK)
! STD_EXCEPTION (INVALID_TRANSACTION)
! STD_EXCEPTION (WRONG_TRANSACTION)
#undef STD_EXCEPTION
--- 552,599 ----
////////////// and insertToAnyFnNCP static variables /////
//////////////////////////////////////////////////////////////////////
+
+ // XXX This should really be done using the initializer mechanism as in
+ // in orbcore.
class dynException_Singleton {
public:
!
! void attach() {
#define STD_EXCEPTION(name) \
CORBA::name::insertToAnyFn = name##_insertToAny; \
! CORBA::name::insertToAnyFnNCP = name##_insertToAnyNCP
! STD_EXCEPTION (UNKNOWN);
! STD_EXCEPTION (BAD_PARAM);
! STD_EXCEPTION (NO_MEMORY);
! STD_EXCEPTION (IMP_LIMIT);
! STD_EXCEPTION (COMM_FAILURE);
! STD_EXCEPTION (INV_OBJREF);
! STD_EXCEPTION (OBJECT_NOT_EXIST);
! STD_EXCEPTION (NO_PERMISSION);
! STD_EXCEPTION (INTERNAL);
! STD_EXCEPTION (MARSHAL);
! STD_EXCEPTION (INITIALIZE);
! STD_EXCEPTION (NO_IMPLEMENT);
! STD_EXCEPTION (BAD_TYPECODE);
! STD_EXCEPTION (BAD_OPERATION);
! STD_EXCEPTION (NO_RESOURCES);
! STD_EXCEPTION (NO_RESPONSE);
! STD_EXCEPTION (PERSIST_STORE);
! STD_EXCEPTION (BAD_INV_ORDER);
! STD_EXCEPTION (TRANSIENT);
! STD_EXCEPTION (FREE_MEM);
! STD_EXCEPTION (INV_IDENT);
! STD_EXCEPTION (INV_FLAG);
! STD_EXCEPTION (INTF_REPOS);
! STD_EXCEPTION (BAD_CONTEXT);
! STD_EXCEPTION (OBJ_ADAPTER);
! STD_EXCEPTION (DATA_CONVERSION);
! STD_EXCEPTION (TRANSACTION_REQUIRED);
! STD_EXCEPTION (TRANSACTION_ROLLEDBACK);
! STD_EXCEPTION (INVALID_TRANSACTION);
! STD_EXCEPTION (WRONG_TRANSACTION);
#undef STD_EXCEPTION
***************
*** 599,625 ****
#define USER_EXCEPTION(fqname,_fqname) \
CORBA::fqname::insertToAnyFn = _fqname##_insertToAny; \
! CORBA::fqname::insertToAnyFnNCP = _fqname##_insertToAnyNCP;
! USER_EXCEPTION_1 (WrongTransaction)
! USER_EXCEPTION_2 (ContextList,Bounds)
! USER_EXCEPTION_2 (ExceptionList,Bounds)
! USER_EXCEPTION_2 (NVList,Bounds)
! USER_EXCEPTION_2 (TypeCode,Bounds)
! USER_EXCEPTION_2 (TypeCode,BadKind)
! USER_EXCEPTION_2 (DynAny,Invalid)
! USER_EXCEPTION_2 (DynAny,InvalidValue)
! USER_EXCEPTION_2 (DynAny,TypeMismatch)
! USER_EXCEPTION_2 (DynAny,InvalidSeq)
! USER_EXCEPTION_2 (ORB,InconsistentTypeCode)
! USER_EXCEPTION_2 (ORB,InvalidName)
#undef USER_EXCEPTION_1
#undef USER_EXCEPTION_2
#undef USER_EXCEPTION
}
~dynException_Singleton() {}
};
static dynException_Singleton dynException_Singleton_;
--- 603,634 ----
#define USER_EXCEPTION(fqname,_fqname) \
CORBA::fqname::insertToAnyFn = _fqname##_insertToAny; \
! CORBA::fqname::insertToAnyFnNCP = _fqname##_insertToAnyNCP
! USER_EXCEPTION_1 (WrongTransaction);
! USER_EXCEPTION_2 (ContextList,Bounds);
! USER_EXCEPTION_2 (ExceptionList,Bounds);
! USER_EXCEPTION_2 (NVList,Bounds);
! USER_EXCEPTION_2 (TypeCode,Bounds);
! USER_EXCEPTION_2 (TypeCode,BadKind);
! USER_EXCEPTION_2 (DynAny,Invalid);
! USER_EXCEPTION_2 (DynAny,InvalidValue);
! USER_EXCEPTION_2 (DynAny,TypeMismatch);
! USER_EXCEPTION_2 (DynAny,InvalidSeq);
! USER_EXCEPTION_2 (ORB,InconsistentTypeCode);
! USER_EXCEPTION_2 (ORB,InvalidName);
#undef USER_EXCEPTION_1
#undef USER_EXCEPTION_2
#undef USER_EXCEPTION
+ }
+
+ dynException_Singleton() {
+ attach();
}
~dynException_Singleton() {}
};
static dynException_Singleton dynException_Singleton_;
+
--=-=-=
--
Sai-Lai Lo S.Lo@uk.research.att.com
AT&T Laboratories Cambridge WWW: http://www.uk.research.att.com
24a Trumpington Street Tel: +44 1223 343000
Cambridge CB2 1QA Fax: +44 1223 313542
ENGLAND
--=-=-=--