*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / win32-nat.c
index f177af2f16be66d2e15e102ed2105558db9a88aa..d9525727479d9c3da5590de7cfe343d21d591da7 100644 (file)
@@ -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 */
@@ -1442,7 +1452,6 @@ do_initial_child_stuff (DWORD pid)
   current_event.dwProcessId = pid;
   memset (&current_event, 0, sizeof (current_event));
   push_target (&deprecated_child_ops);
-  child_init_thread_list ();
   disable_breakpoints_in_shlibs (1);
   child_clear_solibs ();
   clear_proceed_status ();
@@ -1588,6 +1597,7 @@ child_attach (char *args, int from_tty)
 
   pid = strtoul (args, 0, 0);          /* Windows pid */
 
+  child_init_thread_list ();
   ok = DebugActiveProcess (pid);
   saw_create = 0;
 
@@ -1725,6 +1735,7 @@ child_create_inferior (char *exec_file, char *allargs, char **env,
   const char *sh;
   int tty;
   int ostdin, ostdout, ostderr;
+  const char *inferior_io_terminal = get_inferior_io_terminal ();
 
   if (!exec_file)
     error (_("No executable specified, use `target exec'."));
@@ -1860,6 +1871,7 @@ child_create_inferior (char *exec_file, char *allargs, char **env,
        }
     }
 
+  child_init_thread_list ();
   ret = CreateProcess (0,
                       args,    /* command line */
                       NULL,    /* Security */
@@ -1920,7 +1932,7 @@ child_stop (void)
 }
 
 int
-child_xfer_memory (CORE_ADDR memaddr, char *our, int len,
+child_xfer_memory (CORE_ADDR memaddr, gdb_byte *our, int len,
                   int write, struct mem_attrib *mem,
                   struct target_ops *target)
 {
This page took 0.024326 seconds and 4 git commands to generate.