daily update
[deliverable/binutils-gdb.git] / gdb / windows-nat.c
index 643135c6a037cbd89f9b4a6950de34285e771f0a..bfdf9dcc06847d28614f75cafcae8e2804e6709a 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;
 
@@ -1860,6 +1870,7 @@ child_create_inferior (char *exec_file, char *allargs, char **env,
        }
     }
 
+  child_init_thread_list ();
   ret = CreateProcess (0,
                       args,    /* command line */
                       NULL,    /* Security */
@@ -2118,69 +2129,70 @@ _initialize_win32_nat (void)
   init_child_ops ();
 
   c = add_com ("dll-symbols", class_files, dll_symbol_command,
-              "Load dll library symbols from FILE.");
+              _("Load dll library symbols from FILE."));
   set_cmd_completer (c, filename_completer);
 
   add_com_alias ("sharedlibrary", "dll-symbols", class_alias, 1);
 
-  deprecated_add_show_from_set
-    (add_set_cmd ("shell", class_support, var_boolean,
-                 (char *) &useshell,
-                 "Set use of shell to start subprocess.",
-                 &setlist),
-     &showlist);
-
-  deprecated_add_show_from_set
-    (add_set_cmd ("new-console", class_support, var_boolean,
-                 (char *) &new_console,
-                 "Set creation of new console when creating child process.",
-                 &setlist),
-     &showlist);
-
-  deprecated_add_show_from_set
-    (add_set_cmd ("new-group", class_support, var_boolean,
-                 (char *) &new_group,
-                 "Set creation of new group when creating child process.",
-                 &setlist),
-     &showlist);
-
-  deprecated_add_show_from_set
-    (add_set_cmd ("debugexec", class_support, var_boolean,
-                 (char *) &debug_exec,
-                 "Set whether to display execution in child process.",
-                 &setlist),
-     &showlist);
-
-  deprecated_add_show_from_set
-    (add_set_cmd ("debugevents", class_support, var_boolean,
-                 (char *) &debug_events,
-                 "Set whether to display kernel events in child process.",
-                 &setlist),
-     &showlist);
-
-  deprecated_add_show_from_set
-    (add_set_cmd ("debugmemory", class_support, var_boolean,
-                 (char *) &debug_memory,
-                 "Set whether to display memory accesses in child process.",
-                 &setlist),
-     &showlist);
-
-  deprecated_add_show_from_set
-    (add_set_cmd ("debugexceptions", class_support, var_boolean,
-                 (char *) &debug_exceptions,
-                 "Set whether to display kernel exceptions in child process.",
-                 &setlist),
-     &showlist);
-
-  add_info ("dll", info_dll_command, "Status of loaded DLLs.");
+  add_setshow_boolean_cmd ("shell", class_support, &useshell, _("\
+Set use of shell to start subprocess."), _("\
+Show use of shell to start subprocess."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
+
+  add_setshow_boolean_cmd ("new-console", class_support, &new_console, _("\
+Set creation of new console when creating child process."), _("\
+Show creation of new console when creating child process."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
+
+  add_setshow_boolean_cmd ("new-group", class_support, &new_group, _("\
+Set creation of new group when creating child process."), _("\
+Show creation of new group when creating child process."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
+
+  add_setshow_boolean_cmd ("debugexec", class_support, &debug_exec, _("\
+Set whether to display execution in child process."), _("\
+Show whether to display execution in child process."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
+
+  add_setshow_boolean_cmd ("debugevents", class_support, &debug_events, _("\
+Set whether to display kernel events in child process."), _("\
+Show whether to display kernel events in child process."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
+
+  add_setshow_boolean_cmd ("debugmemory", class_support, &debug_memory, _("\
+Set whether to display memory accesses in child process."), _("\
+Show whether to display memory accesses in child process."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
+
+  add_setshow_boolean_cmd ("debugexceptions", class_support,
+                          &debug_exceptions, _("\
+Set whether to display kernel exceptions in child process."), _("\
+Show whether to display kernel exceptions in child process."), NULL,
+                          NULL,
+                          NULL, /* FIXME: i18n: */
+                          &setlist, &showlist);
+
+  add_info ("dll", info_dll_command, _("Status of loaded DLLs."));
   add_info_alias ("sharedlibrary", "dll", 1);
 
   add_prefix_cmd ("w32", class_info, info_w32_command,
-                 "Print information specific to Win32 debugging.",
+                 _("Print information specific to Win32 debugging."),
                  &info_w32_cmdlist, "info w32 ", 0, &infolist);
 
   add_cmd ("selector", class_info, display_selectors,
-          "Display selectors infos.",
+          _("Display selectors infos."),
           &info_w32_cmdlist);
 
   add_target (&deprecated_child_ops);
This page took 0.025467 seconds and 4 git commands to generate.