aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorChristopher Faylor <me+cygwin@cgf.cx>2000-03-25 02:26:21 +0000
committerChristopher Faylor <me+cygwin@cgf.cx>2000-03-25 02:26:21 +0000
commit8227c82d1dba6c17fbfa066d271cd4cc0ed07476 (patch)
treee5744515275b59253c675ca7a39a45f4c8a74ffe /gdb
parent11bb320587113cc97e3bcc56c7399c91c1203751 (diff)
downloadgdb-8227c82d1dba6c17fbfa066d271cd4cc0ed07476.zip
gdb-8227c82d1dba6c17fbfa066d271cd4cc0ed07476.tar.gz
gdb-8227c82d1dba6c17fbfa066d271cd4cc0ed07476.tar.bz2
* win32-nat.c: Back out special frame walking code. It was broken.
(handle_exception): Correctly identify an illegal instruction. * config/tm-cygwin.h: Eliminate special frame handling. Just use normal i386 handling.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/config/i386/tm-cygwin.h19
-rw-r--r--gdb/win32-nat.c62
-rw-r--r--gdb/windows-nat.c62
4 files changed, 18 insertions, 132 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 902d971..78e1523 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2000-03-24 Christopher Faylor <cgf@cygnus.com>
+
+ * win32-nat.c: Back out special frame walking code. It was broken.
+ (handle_exception): Correctly identify an illegal instruction.
+ * config/tm-cygwin.h: Eliminate special frame handling. Just use
+ normal i386 handling.
+
2000-03-24 J.T. Conklin <jtc@redback.com>
* i386/tm-nbsd.h (USE_STRUCT_CONVENTION): Define.
diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h
index aade168..d726328 100644
--- a/gdb/config/i386/tm-cygwin.h
+++ b/gdb/config/i386/tm-cygwin.h
@@ -1,5 +1,5 @@
/* Macro definitions for i386 running under the win32 API Unix.
- Copyright 1995 - 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GDB.
@@ -29,20 +29,3 @@
extern CORE_ADDR skip_trampoline_code PARAMS ((CORE_ADDR pc, char *name));
extern char *cygwin_pid_to_str PARAMS ((int pid));
-
-struct frame_info;
-void child_init_frame(int x, struct frame_info *);
-CORE_ADDR child_frame_saved_pc(struct frame_info *);
-CORE_ADDR child_frame_chain(struct frame_info *);
-
-#undef FRAME_CHAIN_VALID_ALTERNATE
-#define FRAME_CHAIN_VALID_ALTERNATE 1
-
-#undef INIT_EXTRA_FRAME_INFO
-#define INIT_EXTRA_FRAME_INFO(x, f) child_init_frame(x, f)
-
-#undef FRAME_CHAIN
-#define FRAME_CHAIN child_frame_chain
-
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC child_frame_saved_pc
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 905eee1..4295d4b 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -601,6 +601,11 @@ handle_exception (struct target_waitstatus *ourstatus)
current_event.u.Exception.ExceptionRecord.ExceptionAddress));
ourstatus->value.sig = TARGET_SIGNAL_TRAP;
break;
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ DEBUG_EXCEPT (("gdb: Target exception SINGLE_ILL at 0x%08x\n",
+ current_event.u.Exception.ExceptionRecord.ExceptionAddress));
+ ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ break;
default:
/* This may be a structured exception handling exception. In
that case, we want to let the program try to handle it, and
@@ -1273,60 +1278,3 @@ cygwin_pid_to_str (int pid)
sprintf (buf, "thread %d.0x%x", current_event.dwProcessId, pid);
return buf;
}
-
-static LPVOID __stdcall
-sfta(HANDLE h, DWORD d)
-{
- return NULL;
-}
-
-static DWORD __stdcall
-sgmb(HANDLE h, DWORD d)
-{
-#if 0
- return 4;
-#else
- return SymGetModuleBase (h, d) ?: 4;
-#endif
-}
-
-CORE_ADDR
-child_frame_chain(struct frame_info *f)
-{
- STACKFRAME *sf = (STACKFRAME *) f->extra_info;
- if (!StackWalk (IMAGE_FILE_MACHINE_I386, current_process_handle,
- current_thread->h, sf, NULL, NULL, SymFunctionTableAccess, sgmb, NULL) ||
- !sf->AddrReturn.Offset)
- return 0;
- return sf->AddrFrame.Offset;
-}
-
-CORE_ADDR
-child_frame_saved_pc(struct frame_info *f)
-{
- STACKFRAME *sf = (STACKFRAME *) f->extra_info;
- return sf->AddrReturn.Offset;
-}
-
-void
-child_init_frame(int leaf, struct frame_info *f)
-{
- STACKFRAME *sf;
-
- if (f->next && f->next->extra_info)
- f->extra_info = f->next->extra_info;
- else if (f->prev && f->prev->extra_info)
- f->extra_info = f->prev->extra_info;
- else
- {
- sf = (STACKFRAME *) frame_obstack_alloc (sizeof (*sf));
- f->extra_info = (struct frame_extra_info *) sf;
- memset (sf, 0, sizeof(*sf));
- sf->AddrPC.Offset = f->pc;
- sf->AddrPC.Mode = AddrModeFlat;
- sf->AddrStack.Offset = current_thread->context.Esp;
- sf->AddrStack.Mode = AddrModeFlat;
- sf->AddrFrame.Offset = f->frame;
- sf->AddrFrame.Mode = AddrModeFlat;
- }
-}
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 905eee1..4295d4b 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -601,6 +601,11 @@ handle_exception (struct target_waitstatus *ourstatus)
current_event.u.Exception.ExceptionRecord.ExceptionAddress));
ourstatus->value.sig = TARGET_SIGNAL_TRAP;
break;
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ DEBUG_EXCEPT (("gdb: Target exception SINGLE_ILL at 0x%08x\n",
+ current_event.u.Exception.ExceptionRecord.ExceptionAddress));
+ ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ break;
default:
/* This may be a structured exception handling exception. In
that case, we want to let the program try to handle it, and
@@ -1273,60 +1278,3 @@ cygwin_pid_to_str (int pid)
sprintf (buf, "thread %d.0x%x", current_event.dwProcessId, pid);
return buf;
}
-
-static LPVOID __stdcall
-sfta(HANDLE h, DWORD d)
-{
- return NULL;
-}
-
-static DWORD __stdcall
-sgmb(HANDLE h, DWORD d)
-{
-#if 0
- return 4;
-#else
- return SymGetModuleBase (h, d) ?: 4;
-#endif
-}
-
-CORE_ADDR
-child_frame_chain(struct frame_info *f)
-{
- STACKFRAME *sf = (STACKFRAME *) f->extra_info;
- if (!StackWalk (IMAGE_FILE_MACHINE_I386, current_process_handle,
- current_thread->h, sf, NULL, NULL, SymFunctionTableAccess, sgmb, NULL) ||
- !sf->AddrReturn.Offset)
- return 0;
- return sf->AddrFrame.Offset;
-}
-
-CORE_ADDR
-child_frame_saved_pc(struct frame_info *f)
-{
- STACKFRAME *sf = (STACKFRAME *) f->extra_info;
- return sf->AddrReturn.Offset;
-}
-
-void
-child_init_frame(int leaf, struct frame_info *f)
-{
- STACKFRAME *sf;
-
- if (f->next && f->next->extra_info)
- f->extra_info = f->next->extra_info;
- else if (f->prev && f->prev->extra_info)
- f->extra_info = f->prev->extra_info;
- else
- {
- sf = (STACKFRAME *) frame_obstack_alloc (sizeof (*sf));
- f->extra_info = (struct frame_extra_info *) sf;
- memset (sf, 0, sizeof(*sf));
- sf->AddrPC.Offset = f->pc;
- sf->AddrPC.Mode = AddrModeFlat;
- sf->AddrStack.Offset = current_thread->context.Esp;
- sf->AddrStack.Mode = AddrModeFlat;
- sf->AddrFrame.Offset = f->frame;
- sf->AddrFrame.Mode = AddrModeFlat;
- }
-}