aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me+cygwin@cgf.cx>2005-03-27 05:21:12 +0000
committerChristopher Faylor <me+cygwin@cgf.cx>2005-03-27 05:21:12 +0000
commit8da8e0b3f397df66d6e1c03470f4e6c31a63d292 (patch)
tree27bcf5044bc251904792c7e040d4c7fec7e4671d
parentf3fb768d95b481c8ea49e100fe36bd0344923c57 (diff)
downloadgdb-8da8e0b3f397df66d6e1c03470f4e6c31a63d292.zip
gdb-8da8e0b3f397df66d6e1c03470f4e6c31a63d292.tar.gz
gdb-8da8e0b3f397df66d6e1c03470f4e6c31a63d292.tar.bz2
* win32-nat.c (handle_exception): Treat win32 routines which check for valid
addresses as "special" and don't stop when a SEGV is detected. (get_child_debug_event): Properly flag exception as unhandled.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/win32-nat.c10
-rw-r--r--gdb/windows-nat.c10
3 files changed, 26 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d8ebcbd..eb3faee 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-27 Christopher Faylor <cgf@timesys.com>
+
+ * win32-nat.c (handle_exception): Treat win32 routines which check for
+ valid addresses as "special" and don't stop when a SEGV is detected.
+ (get_child_debug_event): Properly flag exception as unhandled.
+
2005-03-26 Daniel Jacobowitz <dan@codesourcery.com>
* cp-support.c (cp_class_name_from_physname): Rewrite.
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index fb6b611..bfdf9dc 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1077,6 +1077,14 @@ handle_exception (struct target_waitstatus *ourstatus)
case EXCEPTION_ACCESS_VIOLATION:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_ACCESS_VIOLATION");
ourstatus->value.sig = TARGET_SIGNAL_SEGV;
+ {
+ char *fn;
+ if (find_pc_partial_function ((CORE_ADDR) current_event.u.Exception
+ .ExceptionRecord.ExceptionAddress,
+ &fn, NULL, NULL)
+ && strncmp (fn, "KERNEL32!IsBad", strlen ("KERNEL32!IsBad")) == 0)
+ return 0;
+ }
break;
case STATUS_STACK_OVERFLOW:
DEBUG_EXCEPTION_SIMPLE ("STATUS_STACK_OVERFLOW");
@@ -1360,6 +1368,8 @@ get_child_debug_event (int pid, struct target_waitstatus *ourstatus)
break;
if (handle_exception (ourstatus))
retval = current_event.dwThreadId;
+ else
+ continue_status = DBG_EXCEPTION_NOT_HANDLED;
break;
case OUTPUT_DEBUG_STRING_EVENT: /* message from the kernel */
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index fb6b611..bfdf9dc 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1077,6 +1077,14 @@ handle_exception (struct target_waitstatus *ourstatus)
case EXCEPTION_ACCESS_VIOLATION:
DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_ACCESS_VIOLATION");
ourstatus->value.sig = TARGET_SIGNAL_SEGV;
+ {
+ char *fn;
+ if (find_pc_partial_function ((CORE_ADDR) current_event.u.Exception
+ .ExceptionRecord.ExceptionAddress,
+ &fn, NULL, NULL)
+ && strncmp (fn, "KERNEL32!IsBad", strlen ("KERNEL32!IsBad")) == 0)
+ return 0;
+ }
break;
case STATUS_STACK_OVERFLOW:
DEBUG_EXCEPTION_SIMPLE ("STATUS_STACK_OVERFLOW");
@@ -1360,6 +1368,8 @@ get_child_debug_event (int pid, struct target_waitstatus *ourstatus)
break;
if (handle_exception (ourstatus))
retval = current_event.dwThreadId;
+ else
+ continue_status = DBG_EXCEPTION_NOT_HANDLED;
break;
case OUTPUT_DEBUG_STRING_EVENT: /* message from the kernel */