diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-06-18 14:46:08 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-06-18 14:46:08 +0200 |
commit | 7a4b933220109962afd6ed72fe4e352184536e69 (patch) | |
tree | 6a0e978a4c734bcde47f52c2c40e5cf816ba656f /ACE/tests | |
parent | c0a5c2e18a9f7ab12db3e599653c08e22229f334 (diff) | |
download | ATCD-7a4b933220109962afd6ed72fe4e352184536e69.tar.gz |
Update Compiler_Features_39_Test.cpp
Diffstat (limited to 'ACE/tests')
-rw-r--r-- | ACE/tests/Compiler_Features_39_Test.cpp | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/ACE/tests/Compiler_Features_39_Test.cpp b/ACE/tests/Compiler_Features_39_Test.cpp index dd9d331cc54..2050475f247 100644 --- a/ACE/tests/Compiler_Features_39_Test.cpp +++ b/ACE/tests/Compiler_Features_39_Test.cpp @@ -7,21 +7,19 @@ #include "ace/CDR_Base.h" #if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) -int *p = 0; - int ExFilter(EXCEPTION_POINTERS *ep, DWORD code_arg) { - ACE_DEBUG ((LM_INFO,("In SEH Filter\n")); - ACE_DEBUG ((LM_INFO,("Code param=%lX\n"), code_arg)); - ACE_DEBUG ((LM_INFO,("\tep->ExceptionRecord->ExceptionCode =%lX\n"), ep->ExceptionRecord->ExceptionCode); - ACE_DEBUG ((LM_INFO,("\tep->ExceptionRecord->ExceptionAddress =%p\n"), ep->ExceptionRecord->ExceptionAddress); + ACE_DEBUG ((LM_INFO,("In SEH Filter\n"))); + ACE_DEBUG ((LM_INFO,("Code param=%d\n"), code_arg)); + ACE_DEBUG ((LM_INFO,("\tep->ExceptionRecord->ExceptionCode =%d\n"), ep->ExceptionRecord->ExceptionCode)); + ACE_DEBUG ((LM_INFO,("\tep->ExceptionRecord->ExceptionAddress =%@\n"), ep->ExceptionRecord->ExceptionAddress)); if (ep->ExceptionRecord->NumberParameters >= 1) - ACE_DEBUG ((LM_INFO,("\tep->ExceptionRecord->ExceptionInformation[0]=%lX\n"), ep->ExceptionRecord->ExceptionInformation[0])); + ACE_DEBUG ((LM_INFO,("\tep->ExceptionRecord->ExceptionInformation[0]=%@\n"), ep->ExceptionRecord->ExceptionInformation[0])); if (ep->ExceptionRecord->NumberParameters == 2) - ACE_DEBUG ((LM_INFO,("\tep->ExceptionRecord->ExceptionInformation[1]=%lX\n"), ep->ExceptionRecord->ExceptionInformation[1])); + ACE_DEBUG ((LM_INFO,("\tep->ExceptionRecord->ExceptionInformation[1]=%@\n"), ep->ExceptionRecord->ExceptionInformation[1])); return 1; } -#endif +#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ int run_main (int, ACE_TCHAR *[]) @@ -31,22 +29,19 @@ run_main (int, ACE_TCHAR *[]) #if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) ACE_SEH_TRY { - *(reinterpret_cast<size_t*>(&p)) = 0xFFFF0000; - ACE_DEBUG ((LM_DEBUG,("In __try, p=%p\n"), p); - ACE_DEBUG ((LM_DEBUG,("BAD_ADDR =%p\n"), &&BAD_ADDR); -BAD_ADDR: - return *p; + volatile int* pInt = 0x0000000; + *pInt = 20; } ACE_SEH_EXCEPT (ExFilter(GetExceptionInformation(), GetExceptionCode())) { - ACE_DEBUG ((LM_DEBUG,("In SEH __except\n")); + ACE_DEBUG ((LM_DEBUG,("In SEH __except\n"))); } - ACE_DEBUG ((LM_DEBUG,("SEH worked\n")); + ACE_DEBUG ((LM_DEBUG,("SEH worked\n"))); #else ACE_DEBUG ((LM_INFO, ACE_TEXT ("Platform lacks ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS\n"))); -#endif +#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ ACE_END_TEST; |