You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2006/11/30 16:54:02 UTC
svn commit: r480979 - in
/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux:
ia64/hysignal_context.c x86/hysignal_context.c x86_64/hysignal_context.c
Author: hindessm
Date: Thu Nov 30 07:53:59 2006
New Revision: 480979
URL: http://svn.apache.org/viewvc?view=rev&rev=480979
Log:
Removing ifdef statements.
Modified:
harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/ia64/hysignal_context.c
harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86/hysignal_context.c
harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86_64/hysignal_context.c
Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/ia64/hysignal_context.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/ia64/hysignal_context.c?view=diff&rev=480979&r1=480978&r2=480979
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/ia64/hysignal_context.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/ia64/hysignal_context.c Thu Nov 30 07:53:59 2006
@@ -29,9 +29,7 @@
struct sigcontext *sigContext;
ucontext_t *uContext;
-#ifdef HYIA64
assert(0); // should never be here
-#endif
uContext = (ucontext_t *) contextInfo;
sigContext = (struct sigcontext *) &uContext->uc_mcontext;
@@ -123,9 +121,7 @@
"xmm7"
};
-#ifdef HYIA64
assert(0); // should never be here
-#endif
switch (index)
{
@@ -142,84 +138,10 @@
{
*name = "";
-#ifdef HYIA64
assert(0); // should never be here
-#endif
switch (index)
{
- case HYPORT_SIG_GPR_X86_EDI:
- case HYPORT_SIG_GPR_AMD64_RDI:
- case 0:
-#ifdef HYX86_64
- *name = "RDI";
- *value = &info->platformSignalInfo.sigContext->rdi;
-#endif
-#ifdef HYX86
- *name = "EDI";
- *value = &info->platformSignalInfo.sigContext->edi;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_ESI:
- case HYPORT_SIG_GPR_AMD64_RSI:
- case 1:
-#ifdef HYX86
- *name = "ESI";
- *value = &info->platformSignalInfo.sigContext->esi;
-#endif
-#ifdef HYX86_64
- *name = "RSI";
- *value = &info->platformSignalInfo.sigContext->rsi;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_EAX:
- case HYPORT_SIG_GPR_AMD64_RAX:
- case 2:
-#ifdef HYX86
- *name = "EAX";
- *value = &info->platformSignalInfo.sigContext->eax;
-#endif
-#ifdef HYX86_64
- *name = "RAX";
- *value = &info->platformSignalInfo.sigContext->rax;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_EBX:
- case HYPORT_SIG_GPR_AMD64_RBX:
- case 3:
-#ifdef HYX86
- *name = "EBX";
- *value = &info->platformSignalInfo.sigContext->ebx;
-#endif
-#ifdef HYX86_64
- *name = "RBX";
- *value = &info->platformSignalInfo.sigContext->rbx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_ECX:
- case HYPORT_SIG_GPR_AMD64_RCX:
- case 4:
-#ifdef HYX86
- *name = "ECX";
- *value = &info->platformSignalInfo.sigContext->ecx;
-#endif
-#ifdef HYX86_64
- *name = "RCX";
- *value = &info->platformSignalInfo.sigContext->rcx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_EDX:
- case HYPORT_SIG_GPR_AMD64_RDX:
- case 5:
-#ifdef HYX86
- *name = "EDX";
- *value = &info->platformSignalInfo.sigContext->edx;
-#endif
-#ifdef HYX86_64
- *name = "RDX";
- *value = &info->platformSignalInfo.sigContext->rdx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
default:
return HYPORT_SIG_VALUE_UNDEFINED;
}
@@ -235,71 +157,10 @@
*name = "";
U_8 *eip;
-#ifdef HYIA64
assert(0); // should never be here
-#endif
switch (index)
{
- case HYPORT_SIG_CONTROL_PC:
- case 0:
-#ifdef HYX86
- *name = "EIP";
- *value = (void *) &(info->platformSignalInfo.sigContext->eip);
-#endif
-#ifdef HYX86_64
- *name = "RIP";
- *value = (void *) &(info->platformSignalInfo.sigContext->rip);
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
-#ifdef HYX86
- case 1:
- *name = "ES";
- *value = (void *) &(info->platformSignalInfo.sigContext->es);
- return HYPORT_SIG_VALUE_ADDRESS;
- case 2:
- *name = "DS";
- *value = (void *) &(info->platformSignalInfo.sigContext->ds);
- return HYPORT_SIG_VALUE_ADDRESS;
-#endif
- case HYPORT_SIG_CONTROL_SP:
- case 3:
-#ifdef HYX86
- *name = "ESP";
- *value = (void *) &(info->platformSignalInfo.sigContext->esp);
-#endif
-#ifdef HYX86_64
- *name = "RSP";
- *value = (void *) &(info->platformSignalInfo.sigContext->rsp);
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case 4:
-#ifndef HYIA64
- *name = "EFlags";
- *value = (void *) &(info->platformSignalInfo.sigContext->eflags);
- return HYPORT_SIG_VALUE_ADDRESS;
- case 5:
- *name = "CS";
- *value = (void *) &(info->platformSignalInfo.sigContext->cs);
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
-#ifdef HYX86
- case 6:
- *name = "SS";
- *value = (void *) &(info->platformSignalInfo.sigContext->ss);
- return HYPORT_SIG_VALUE_ADDRESS;
-#endif
- case HYPORT_SIG_CONTROL_BP:
- case 7:
-#ifdef HYX86
- *name = "EBP";
- *value = &info->platformSignalInfo.sigContext->ebp;
-#endif
-#ifdef HYX86_64
- *name = "RBP";
- *value = &info->platformSignalInfo.sigContext->rbp;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
default:
return HYPORT_SIG_VALUE_UNDEFINED;
}
@@ -315,23 +176,9 @@
Dl_info *dl_info = &(info->platformSignalInfo.dl_info);
*name = "";
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
-#ifdef HYX86
- address = (void *) info->platformSignalInfo.sigContext->eip;
- int dl_result =
- dladdr ((void *) info->platformSignalInfo.sigContext->eip, dl_info);
-#endif
-#ifdef HYX86_64
- address = (void *) info->platformSignalInfo.sigContext->rip;
+ address = (void *) info->platformSignalInfo.sigContext->sc_ip;
int dl_result =
- dladdr ((void *) info->platformSignalInfo.sigContext->rip, dl_info);
-#endif
-#ifdef HYIA64
- int dl_result = 0;
-#endif
+ dladdr ((void *) info->platformSignalInfo.sigContext->sc_ip, dl_info);
switch (index)
{
Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86/hysignal_context.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86/hysignal_context.c?view=diff&rev=480979&r1=480978&r2=480979
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86/hysignal_context.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86/hysignal_context.c Thu Nov 30 07:53:59 2006
@@ -20,7 +20,6 @@
#include <string.h>
#include <sys/ucontext.h>
#include "hysignal_context.h"
-#include <assert.h>
void
fillInUnixSignalInfo (struct HyPortLibrary *portLibrary, void *contextInfo,
@@ -29,10 +28,6 @@
struct sigcontext *sigContext;
ucontext_t *uContext;
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
uContext = (ucontext_t *) contextInfo;
sigContext = (struct sigcontext *) &uContext->uc_mcontext;
@@ -123,10 +118,6 @@
"xmm7"
};
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
switch (index)
{
default:
@@ -142,84 +133,38 @@
{
*name = "";
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
switch (index)
{
case HYPORT_SIG_GPR_X86_EDI:
- case HYPORT_SIG_GPR_AMD64_RDI:
case 0:
-#ifdef HYX86_64
- *name = "RDI";
- *value = &info->platformSignalInfo.sigContext->rdi;
-#endif
-#ifdef HYX86
*name = "EDI";
*value = &info->platformSignalInfo.sigContext->edi;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_ESI:
- case HYPORT_SIG_GPR_AMD64_RSI:
case 1:
-#ifdef HYX86
*name = "ESI";
*value = &info->platformSignalInfo.sigContext->esi;
-#endif
-#ifdef HYX86_64
- *name = "RSI";
- *value = &info->platformSignalInfo.sigContext->rsi;
-#endif
return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_EAX:
- case HYPORT_SIG_GPR_AMD64_RAX:
case 2:
-#ifdef HYX86
*name = "EAX";
*value = &info->platformSignalInfo.sigContext->eax;
-#endif
-#ifdef HYX86_64
- *name = "RAX";
- *value = &info->platformSignalInfo.sigContext->rax;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_EBX:
- case HYPORT_SIG_GPR_AMD64_RBX:
case 3:
-#ifdef HYX86
*name = "EBX";
*value = &info->platformSignalInfo.sigContext->ebx;
-#endif
-#ifdef HYX86_64
- *name = "RBX";
- *value = &info->platformSignalInfo.sigContext->rbx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_ECX:
- case HYPORT_SIG_GPR_AMD64_RCX:
case 4:
-#ifdef HYX86
*name = "ECX";
*value = &info->platformSignalInfo.sigContext->ecx;
-#endif
-#ifdef HYX86_64
- *name = "RCX";
- *value = &info->platformSignalInfo.sigContext->rcx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_X86_EDX:
- case HYPORT_SIG_GPR_AMD64_RDX:
case 5:
-#ifdef HYX86
*name = "EDX";
*value = &info->platformSignalInfo.sigContext->edx;
-#endif
-#ifdef HYX86_64
- *name = "RDX";
- *value = &info->platformSignalInfo.sigContext->rdx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
+ return HYPORT_SIG_VALUE_ADDRESS;
default:
return HYPORT_SIG_VALUE_UNDEFINED;
}
@@ -235,24 +180,13 @@
*name = "";
U_8 *eip;
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
switch (index)
{
case HYPORT_SIG_CONTROL_PC:
case 0:
-#ifdef HYX86
*name = "EIP";
*value = (void *) &(info->platformSignalInfo.sigContext->eip);
-#endif
-#ifdef HYX86_64
- *name = "RIP";
- *value = (void *) &(info->platformSignalInfo.sigContext->rip);
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
-#ifdef HYX86
+ return HYPORT_SIG_VALUE_ADDRESS;
case 1:
*name = "ES";
*value = (void *) &(info->platformSignalInfo.sigContext->es);
@@ -261,45 +195,28 @@
*name = "DS";
*value = (void *) &(info->platformSignalInfo.sigContext->ds);
return HYPORT_SIG_VALUE_ADDRESS;
-#endif
case HYPORT_SIG_CONTROL_SP:
case 3:
-#ifdef HYX86
*name = "ESP";
*value = (void *) &(info->platformSignalInfo.sigContext->esp);
-#endif
-#ifdef HYX86_64
- *name = "RSP";
- *value = (void *) &(info->platformSignalInfo.sigContext->rsp);
-#endif
return HYPORT_SIG_VALUE_ADDRESS;
case 4:
-#ifndef HYIA64
*name = "EFlags";
*value = (void *) &(info->platformSignalInfo.sigContext->eflags);
return HYPORT_SIG_VALUE_ADDRESS;
case 5:
*name = "CS";
*value = (void *) &(info->platformSignalInfo.sigContext->cs);
-#endif
return HYPORT_SIG_VALUE_ADDRESS;
-#ifdef HYX86
case 6:
*name = "SS";
*value = (void *) &(info->platformSignalInfo.sigContext->ss);
return HYPORT_SIG_VALUE_ADDRESS;
-#endif
- case HYPORT_SIG_CONTROL_BP:
+ case HYPORT_SIG_CONTROL_BP:
case 7:
-#ifdef HYX86
*name = "EBP";
*value = &info->platformSignalInfo.sigContext->ebp;
-#endif
-#ifdef HYX86_64
- *name = "RBP";
- *value = &info->platformSignalInfo.sigContext->rbp;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
+ return HYPORT_SIG_VALUE_ADDRESS;
default:
return HYPORT_SIG_VALUE_UNDEFINED;
}
@@ -315,23 +232,9 @@
Dl_info *dl_info = &(info->platformSignalInfo.dl_info);
*name = "";
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
-#ifdef HYX86
address = (void *) info->platformSignalInfo.sigContext->eip;
int dl_result =
dladdr ((void *) info->platformSignalInfo.sigContext->eip, dl_info);
-#endif
-#ifdef HYX86_64
- address = (void *) info->platformSignalInfo.sigContext->rip;
- int dl_result =
- dladdr ((void *) info->platformSignalInfo.sigContext->rip, dl_info);
-#endif
-#ifdef HYIA64
- int dl_result = 0;
-#endif
switch (index)
{
Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86_64/hysignal_context.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86_64/hysignal_context.c?view=diff&rev=480979&r1=480978&r2=480979
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86_64/hysignal_context.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/linux/x86_64/hysignal_context.c Thu Nov 30 07:53:59 2006
@@ -20,7 +20,6 @@
#include <string.h>
#include <sys/ucontext.h>
#include "hysignal_context.h"
-#include <assert.h>
void
fillInUnixSignalInfo (struct HyPortLibrary *portLibrary, void *contextInfo,
@@ -29,10 +28,6 @@
struct sigcontext *sigContext;
ucontext_t *uContext;
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
uContext = (ucontext_t *) contextInfo;
sigContext = (struct sigcontext *) &uContext->uc_mcontext;
@@ -123,10 +118,6 @@
"xmm7"
};
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
switch (index)
{
default:
@@ -142,84 +133,38 @@
{
*name = "";
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
switch (index)
{
- case HYPORT_SIG_GPR_X86_EDI:
- case HYPORT_SIG_GPR_AMD64_RDI:
+ case HYPORT_SIG_GPR_AMD64_RDI:
case 0:
-#ifdef HYX86_64
*name = "RDI";
*value = &info->platformSignalInfo.sigContext->rdi;
-#endif
-#ifdef HYX86
- *name = "EDI";
- *value = &info->platformSignalInfo.sigContext->edi;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_ESI:
- case HYPORT_SIG_GPR_AMD64_RSI:
+ return HYPORT_SIG_VALUE_ADDRESS;
+ case HYPORT_SIG_GPR_AMD64_RSI:
case 1:
-#ifdef HYX86
- *name = "ESI";
- *value = &info->platformSignalInfo.sigContext->esi;
-#endif
-#ifdef HYX86_64
*name = "RSI";
*value = &info->platformSignalInfo.sigContext->rsi;
-#endif
return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_EAX:
case HYPORT_SIG_GPR_AMD64_RAX:
case 2:
-#ifdef HYX86
- *name = "EAX";
- *value = &info->platformSignalInfo.sigContext->eax;
-#endif
-#ifdef HYX86_64
*name = "RAX";
*value = &info->platformSignalInfo.sigContext->rax;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_EBX:
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_AMD64_RBX:
case 3:
-#ifdef HYX86
- *name = "EBX";
- *value = &info->platformSignalInfo.sigContext->ebx;
-#endif
-#ifdef HYX86_64
*name = "RBX";
*value = &info->platformSignalInfo.sigContext->rbx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_ECX:
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_AMD64_RCX:
case 4:
-#ifdef HYX86
- *name = "ECX";
- *value = &info->platformSignalInfo.sigContext->ecx;
-#endif
-#ifdef HYX86_64
*name = "RCX";
*value = &info->platformSignalInfo.sigContext->rcx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
- case HYPORT_SIG_GPR_X86_EDX:
+ return HYPORT_SIG_VALUE_ADDRESS;
case HYPORT_SIG_GPR_AMD64_RDX:
case 5:
-#ifdef HYX86
- *name = "EDX";
- *value = &info->platformSignalInfo.sigContext->edx;
-#endif
-#ifdef HYX86_64
*name = "RDX";
*value = &info->platformSignalInfo.sigContext->rdx;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
+ return HYPORT_SIG_VALUE_ADDRESS;
default:
return HYPORT_SIG_VALUE_UNDEFINED;
}
@@ -235,71 +180,31 @@
*name = "";
U_8 *eip;
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
switch (index)
{
case HYPORT_SIG_CONTROL_PC:
case 0:
-#ifdef HYX86
- *name = "EIP";
- *value = (void *) &(info->platformSignalInfo.sigContext->eip);
-#endif
-#ifdef HYX86_64
*name = "RIP";
*value = (void *) &(info->platformSignalInfo.sigContext->rip);
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
-#ifdef HYX86
- case 1:
- *name = "ES";
- *value = (void *) &(info->platformSignalInfo.sigContext->es);
- return HYPORT_SIG_VALUE_ADDRESS;
- case 2:
- *name = "DS";
- *value = (void *) &(info->platformSignalInfo.sigContext->ds);
return HYPORT_SIG_VALUE_ADDRESS;
-#endif
case HYPORT_SIG_CONTROL_SP:
case 3:
-#ifdef HYX86
- *name = "ESP";
- *value = (void *) &(info->platformSignalInfo.sigContext->esp);
-#endif
-#ifdef HYX86_64
*name = "RSP";
*value = (void *) &(info->platformSignalInfo.sigContext->rsp);
-#endif
return HYPORT_SIG_VALUE_ADDRESS;
case 4:
-#ifndef HYIA64
*name = "EFlags";
*value = (void *) &(info->platformSignalInfo.sigContext->eflags);
return HYPORT_SIG_VALUE_ADDRESS;
case 5:
*name = "CS";
*value = (void *) &(info->platformSignalInfo.sigContext->cs);
-#endif
return HYPORT_SIG_VALUE_ADDRESS;
-#ifdef HYX86
+ case HYPORT_SIG_CONTROL_BP:
case 6:
- *name = "SS";
- *value = (void *) &(info->platformSignalInfo.sigContext->ss);
- return HYPORT_SIG_VALUE_ADDRESS;
-#endif
- case HYPORT_SIG_CONTROL_BP:
- case 7:
-#ifdef HYX86
- *name = "EBP";
- *value = &info->platformSignalInfo.sigContext->ebp;
-#endif
-#ifdef HYX86_64
*name = "RBP";
*value = &info->platformSignalInfo.sigContext->rbp;
-#endif
- return HYPORT_SIG_VALUE_ADDRESS;
+ return HYPORT_SIG_VALUE_ADDRESS;
default:
return HYPORT_SIG_VALUE_UNDEFINED;
}
@@ -315,23 +220,9 @@
Dl_info *dl_info = &(info->platformSignalInfo.dl_info);
*name = "";
-#ifdef HYIA64
- assert(0); // should never be here
-#endif
-
-#ifdef HYX86
- address = (void *) info->platformSignalInfo.sigContext->eip;
- int dl_result =
- dladdr ((void *) info->platformSignalInfo.sigContext->eip, dl_info);
-#endif
-#ifdef HYX86_64
address = (void *) info->platformSignalInfo.sigContext->rip;
int dl_result =
dladdr ((void *) info->platformSignalInfo.sigContext->rip, dl_info);
-#endif
-#ifdef HYIA64
- int dl_result = 0;
-#endif
switch (index)
{