Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Side by Side Diff: gdb/gdbserver/win32-low.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/gdbserver/tracepoint.c ('k') | gdb/gdbthread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Low level interface to Windows debugging, for gdbserver. 1 /* Low level interface to Windows debugging, for gdbserver.
2 Copyright (C) 2006-2012 Free Software Foundation, Inc. 2 Copyright (C) 2006-2012 Free Software Foundation, Inc.
3 3
4 Contributed by Leo Zayas. Based on "win32-nat.c" from GDB. 4 Contributed by Leo Zayas. Based on "win32-nat.c" from GDB.
5 5
6 This file is part of GDB. 6 This file is part of GDB.
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or 10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version. 11 (at your option) any later version.
12 12
13 This program is distributed in the hope that it will be useful, 13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details. 16 GNU General Public License for more details.
17 17
18 You should have received a copy of the GNU General Public License 18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 #include "server.h" 21 #include "server.h"
22 #include "regcache.h" 22 #include "regcache.h"
23 #include "gdb/signals.h" 23 #include "gdb/signals.h"
24 #include "gdb/fileio.h" 24 #include "gdb/fileio.h"
25 #include "mem-break.h" 25 #include "mem-break.h"
26 #include "win32-low.h" 26 #include "win32-low.h"
27 #include "gdbthread.h"
27 28
28 #include <stdint.h> 29 #include <stdint.h>
29 #include <windows.h> 30 #include <windows.h>
30 #include <winnt.h> 31 #include <winnt.h>
31 #include <imagehlp.h> 32 #include <imagehlp.h>
32 #include <tlhelp32.h> 33 #include <tlhelp32.h>
33 #include <psapi.h> 34 #include <psapi.h>
34 #include <sys/param.h> 35 #include <sys/param.h>
35 #include <process.h> 36 #include <process.h>
36 37
(...skipping 29 matching lines...) Expand all
66 ((winapi_ ## PROC) GetProcAddress (DLL, #PROC)) 67 ((winapi_ ## PROC) GetProcAddress (DLL, #PROC))
67 #endif 68 #endif
68 69
69 int using_threads = 1; 70 int using_threads = 1;
70 71
71 /* Globals. */ 72 /* Globals. */
72 static int attaching = 0; 73 static int attaching = 0;
73 static HANDLE current_process_handle = NULL; 74 static HANDLE current_process_handle = NULL;
74 static DWORD current_process_id = 0; 75 static DWORD current_process_id = 0;
75 static DWORD main_thread_id = 0; 76 static DWORD main_thread_id = 0;
76 static enum target_signal last_sig = TARGET_SIGNAL_0; 77 static enum gdb_signal last_sig = GDB_SIGNAL_0;
77 78
78 /* The current debug event from WaitForDebugEvent. */ 79 /* The current debug event from WaitForDebugEvent. */
79 static DEBUG_EVENT current_event; 80 static DEBUG_EVENT current_event;
80 81
81 /* Non zero if an interrupt request is to be satisfied by suspending 82 /* Non zero if an interrupt request is to be satisfied by suspending
82 all threads. */ 83 all threads. */
83 static int soft_interrupt_requested = 0; 84 static int soft_interrupt_requested = 0;
84 85
85 /* Non zero if the inferior is stopped in a simulated breakpoint done 86 /* Non zero if the inferior is stopped in a simulated breakpoint done
86 by suspending all the threads. */ 87 by suspending all the threads. */
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 state. */ 301 state. */
301 static void 302 static void
302 child_init_thread_list (void) 303 child_init_thread_list (void)
303 { 304 {
304 for_each_inferior (&all_threads, delete_thread_info); 305 for_each_inferior (&all_threads, delete_thread_info);
305 } 306 }
306 307
307 static void 308 static void
308 do_initial_child_stuff (HANDLE proch, DWORD pid, int attached) 309 do_initial_child_stuff (HANDLE proch, DWORD pid, int attached)
309 { 310 {
310 last_sig = TARGET_SIGNAL_0; 311 last_sig = GDB_SIGNAL_0;
311 312
312 current_process_handle = proch; 313 current_process_handle = proch;
313 current_process_id = pid; 314 current_process_id = pid;
314 main_thread_id = 0; 315 main_thread_id = 0;
315 316
316 soft_interrupt_requested = 0; 317 soft_interrupt_requested = 0;
317 faked_breakpoint = 0; 318 faked_breakpoint = 0;
318 319
319 memset (&current_event, 0, sizeof (current_event)); 320 memset (&current_event, 0, sizeof (current_event));
320 321
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 res = 0; 799 res = 0;
799 return res; 800 return res;
800 } 801 }
801 802
802 /* Resume the inferior process. RESUME_INFO describes how we want 803 /* Resume the inferior process. RESUME_INFO describes how we want
803 to resume. */ 804 to resume. */
804 static void 805 static void
805 win32_resume (struct thread_resume *resume_info, size_t n) 806 win32_resume (struct thread_resume *resume_info, size_t n)
806 { 807 {
807 DWORD tid; 808 DWORD tid;
808 enum target_signal sig; 809 enum gdb_signal sig;
809 int step; 810 int step;
810 win32_thread_info *th; 811 win32_thread_info *th;
811 DWORD continue_status = DBG_CONTINUE; 812 DWORD continue_status = DBG_CONTINUE;
812 ptid_t ptid; 813 ptid_t ptid;
813 814
814 /* This handles the very limited set of resume packets that GDB can 815 /* This handles the very limited set of resume packets that GDB can
815 currently produce. */ 816 currently produce. */
816 817
817 if (n == 1 && ptid_equal (resume_info[0].thread, minus_one_ptid)) 818 if (n == 1 && ptid_equal (resume_info[0].thread, minus_one_ptid))
818 tid = -1; 819 tid = -1;
819 else if (n > 1) 820 else if (n > 1)
820 tid = -1; 821 tid = -1;
821 else 822 else
822 /* Yes, we're ignoring resume_info[0].thread. It'd be tricky to make 823 /* Yes, we're ignoring resume_info[0].thread. It'd be tricky to make
823 the Windows resume code do the right thing for thread switching. */ 824 the Windows resume code do the right thing for thread switching. */
824 tid = current_event.dwThreadId; 825 tid = current_event.dwThreadId;
825 826
826 if (!ptid_equal (resume_info[0].thread, minus_one_ptid)) 827 if (!ptid_equal (resume_info[0].thread, minus_one_ptid))
827 { 828 {
828 sig = resume_info[0].sig; 829 sig = resume_info[0].sig;
829 step = resume_info[0].kind == resume_step; 830 step = resume_info[0].kind == resume_step;
830 } 831 }
831 else 832 else
832 { 833 {
833 sig = 0; 834 sig = 0;
834 step = 0; 835 step = 0;
835 } 836 }
836 837
837 if (sig != TARGET_SIGNAL_0) 838 if (sig != GDB_SIGNAL_0)
838 { 839 {
839 if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT) 840 if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT)
840 { 841 {
841 OUTMSG (("Cannot continue with signal %d here.\n", sig)); 842 OUTMSG (("Cannot continue with signal %d here.\n", sig));
842 } 843 }
843 else if (sig == last_sig) 844 else if (sig == last_sig)
844 continue_status = DBG_EXCEPTION_NOT_HANDLED; 845 continue_status = DBG_EXCEPTION_NOT_HANDLED;
845 else 846 else
846 OUTMSG (("Can only continue with recieved signal %d.\n", last_sig)); 847 OUTMSG (("Can only continue with recieved signal %d.\n", last_sig));
847 } 848 }
848 849
849 last_sig = TARGET_SIGNAL_0; 850 last_sig = GDB_SIGNAL_0;
850 851
851 /* Get context for the currently selected thread. */ 852 /* Get context for the currently selected thread. */
852 ptid = debug_event_ptid (&current_event); 853 ptid = debug_event_ptid (&current_event);
853 th = thread_rec (ptid, FALSE); 854 th = thread_rec (ptid, FALSE);
854 if (th) 855 if (th)
855 { 856 {
856 if (th->context.ContextFlags) 857 if (th->context.ContextFlags)
857 { 858 {
858 /* Move register values from the inferior into the thread 859 /* Move register values from the inferior into the thread
859 context structure. */ 860 context structure. */
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 handle_exception (struct target_waitstatus *ourstatus) 1225 handle_exception (struct target_waitstatus *ourstatus)
1225 { 1226 {
1226 DWORD code = current_event.u.Exception.ExceptionRecord.ExceptionCode; 1227 DWORD code = current_event.u.Exception.ExceptionRecord.ExceptionCode;
1227 1228
1228 ourstatus->kind = TARGET_WAITKIND_STOPPED; 1229 ourstatus->kind = TARGET_WAITKIND_STOPPED;
1229 1230
1230 switch (code) 1231 switch (code)
1231 { 1232 {
1232 case EXCEPTION_ACCESS_VIOLATION: 1233 case EXCEPTION_ACCESS_VIOLATION:
1233 OUTMSG2 (("EXCEPTION_ACCESS_VIOLATION")); 1234 OUTMSG2 (("EXCEPTION_ACCESS_VIOLATION"));
1234 ourstatus->value.sig = TARGET_SIGNAL_SEGV; 1235 ourstatus->value.sig = GDB_SIGNAL_SEGV;
1235 break; 1236 break;
1236 case STATUS_STACK_OVERFLOW: 1237 case STATUS_STACK_OVERFLOW:
1237 OUTMSG2 (("STATUS_STACK_OVERFLOW")); 1238 OUTMSG2 (("STATUS_STACK_OVERFLOW"));
1238 ourstatus->value.sig = TARGET_SIGNAL_SEGV; 1239 ourstatus->value.sig = GDB_SIGNAL_SEGV;
1239 break; 1240 break;
1240 case STATUS_FLOAT_DENORMAL_OPERAND: 1241 case STATUS_FLOAT_DENORMAL_OPERAND:
1241 OUTMSG2 (("STATUS_FLOAT_DENORMAL_OPERAND")); 1242 OUTMSG2 (("STATUS_FLOAT_DENORMAL_OPERAND"));
1242 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1243 ourstatus->value.sig = GDB_SIGNAL_FPE;
1243 break; 1244 break;
1244 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: 1245 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
1245 OUTMSG2 (("EXCEPTION_ARRAY_BOUNDS_EXCEEDED")); 1246 OUTMSG2 (("EXCEPTION_ARRAY_BOUNDS_EXCEEDED"));
1246 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1247 ourstatus->value.sig = GDB_SIGNAL_FPE;
1247 break; 1248 break;
1248 case STATUS_FLOAT_INEXACT_RESULT: 1249 case STATUS_FLOAT_INEXACT_RESULT:
1249 OUTMSG2 (("STATUS_FLOAT_INEXACT_RESULT")); 1250 OUTMSG2 (("STATUS_FLOAT_INEXACT_RESULT"));
1250 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1251 ourstatus->value.sig = GDB_SIGNAL_FPE;
1251 break; 1252 break;
1252 case STATUS_FLOAT_INVALID_OPERATION: 1253 case STATUS_FLOAT_INVALID_OPERATION:
1253 OUTMSG2 (("STATUS_FLOAT_INVALID_OPERATION")); 1254 OUTMSG2 (("STATUS_FLOAT_INVALID_OPERATION"));
1254 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1255 ourstatus->value.sig = GDB_SIGNAL_FPE;
1255 break; 1256 break;
1256 case STATUS_FLOAT_OVERFLOW: 1257 case STATUS_FLOAT_OVERFLOW:
1257 OUTMSG2 (("STATUS_FLOAT_OVERFLOW")); 1258 OUTMSG2 (("STATUS_FLOAT_OVERFLOW"));
1258 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1259 ourstatus->value.sig = GDB_SIGNAL_FPE;
1259 break; 1260 break;
1260 case STATUS_FLOAT_STACK_CHECK: 1261 case STATUS_FLOAT_STACK_CHECK:
1261 OUTMSG2 (("STATUS_FLOAT_STACK_CHECK")); 1262 OUTMSG2 (("STATUS_FLOAT_STACK_CHECK"));
1262 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1263 ourstatus->value.sig = GDB_SIGNAL_FPE;
1263 break; 1264 break;
1264 case STATUS_FLOAT_UNDERFLOW: 1265 case STATUS_FLOAT_UNDERFLOW:
1265 OUTMSG2 (("STATUS_FLOAT_UNDERFLOW")); 1266 OUTMSG2 (("STATUS_FLOAT_UNDERFLOW"));
1266 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1267 ourstatus->value.sig = GDB_SIGNAL_FPE;
1267 break; 1268 break;
1268 case STATUS_FLOAT_DIVIDE_BY_ZERO: 1269 case STATUS_FLOAT_DIVIDE_BY_ZERO:
1269 OUTMSG2 (("STATUS_FLOAT_DIVIDE_BY_ZERO")); 1270 OUTMSG2 (("STATUS_FLOAT_DIVIDE_BY_ZERO"));
1270 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1271 ourstatus->value.sig = GDB_SIGNAL_FPE;
1271 break; 1272 break;
1272 case STATUS_INTEGER_DIVIDE_BY_ZERO: 1273 case STATUS_INTEGER_DIVIDE_BY_ZERO:
1273 OUTMSG2 (("STATUS_INTEGER_DIVIDE_BY_ZERO")); 1274 OUTMSG2 (("STATUS_INTEGER_DIVIDE_BY_ZERO"));
1274 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1275 ourstatus->value.sig = GDB_SIGNAL_FPE;
1275 break; 1276 break;
1276 case STATUS_INTEGER_OVERFLOW: 1277 case STATUS_INTEGER_OVERFLOW:
1277 OUTMSG2 (("STATUS_INTEGER_OVERFLOW")); 1278 OUTMSG2 (("STATUS_INTEGER_OVERFLOW"));
1278 ourstatus->value.sig = TARGET_SIGNAL_FPE; 1279 ourstatus->value.sig = GDB_SIGNAL_FPE;
1279 break; 1280 break;
1280 case EXCEPTION_BREAKPOINT: 1281 case EXCEPTION_BREAKPOINT:
1281 OUTMSG2 (("EXCEPTION_BREAKPOINT")); 1282 OUTMSG2 (("EXCEPTION_BREAKPOINT"));
1282 ourstatus->value.sig = TARGET_SIGNAL_TRAP; 1283 ourstatus->value.sig = GDB_SIGNAL_TRAP;
1283 #ifdef _WIN32_WCE 1284 #ifdef _WIN32_WCE
1284 /* Remove the initial breakpoint. */ 1285 /* Remove the initial breakpoint. */
1285 check_breakpoints ((CORE_ADDR) (long) current_event 1286 check_breakpoints ((CORE_ADDR) (long) current_event
1286 .u.Exception.ExceptionRecord.ExceptionAddress); 1287 .u.Exception.ExceptionRecord.ExceptionAddress);
1287 #endif 1288 #endif
1288 break; 1289 break;
1289 case DBG_CONTROL_C: 1290 case DBG_CONTROL_C:
1290 OUTMSG2 (("DBG_CONTROL_C")); 1291 OUTMSG2 (("DBG_CONTROL_C"));
1291 ourstatus->value.sig = TARGET_SIGNAL_INT; 1292 ourstatus->value.sig = GDB_SIGNAL_INT;
1292 break; 1293 break;
1293 case DBG_CONTROL_BREAK: 1294 case DBG_CONTROL_BREAK:
1294 OUTMSG2 (("DBG_CONTROL_BREAK")); 1295 OUTMSG2 (("DBG_CONTROL_BREAK"));
1295 ourstatus->value.sig = TARGET_SIGNAL_INT; 1296 ourstatus->value.sig = GDB_SIGNAL_INT;
1296 break; 1297 break;
1297 case EXCEPTION_SINGLE_STEP: 1298 case EXCEPTION_SINGLE_STEP:
1298 OUTMSG2 (("EXCEPTION_SINGLE_STEP")); 1299 OUTMSG2 (("EXCEPTION_SINGLE_STEP"));
1299 ourstatus->value.sig = TARGET_SIGNAL_TRAP; 1300 ourstatus->value.sig = GDB_SIGNAL_TRAP;
1300 break; 1301 break;
1301 case EXCEPTION_ILLEGAL_INSTRUCTION: 1302 case EXCEPTION_ILLEGAL_INSTRUCTION:
1302 OUTMSG2 (("EXCEPTION_ILLEGAL_INSTRUCTION")); 1303 OUTMSG2 (("EXCEPTION_ILLEGAL_INSTRUCTION"));
1303 ourstatus->value.sig = TARGET_SIGNAL_ILL; 1304 ourstatus->value.sig = GDB_SIGNAL_ILL;
1304 break; 1305 break;
1305 case EXCEPTION_PRIV_INSTRUCTION: 1306 case EXCEPTION_PRIV_INSTRUCTION:
1306 OUTMSG2 (("EXCEPTION_PRIV_INSTRUCTION")); 1307 OUTMSG2 (("EXCEPTION_PRIV_INSTRUCTION"));
1307 ourstatus->value.sig = TARGET_SIGNAL_ILL; 1308 ourstatus->value.sig = GDB_SIGNAL_ILL;
1308 break; 1309 break;
1309 case EXCEPTION_NONCONTINUABLE_EXCEPTION: 1310 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
1310 OUTMSG2 (("EXCEPTION_NONCONTINUABLE_EXCEPTION")); 1311 OUTMSG2 (("EXCEPTION_NONCONTINUABLE_EXCEPTION"));
1311 ourstatus->value.sig = TARGET_SIGNAL_ILL; 1312 ourstatus->value.sig = GDB_SIGNAL_ILL;
1312 break; 1313 break;
1313 default: 1314 default:
1314 if (current_event.u.Exception.dwFirstChance) 1315 if (current_event.u.Exception.dwFirstChance)
1315 { 1316 {
1316 ourstatus->kind = TARGET_WAITKIND_SPURIOUS; 1317 ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
1317 return; 1318 return;
1318 } 1319 }
1319 OUTMSG2 (("gdbserver: unknown target exception 0x%08lx at 0x%s", 1320 OUTMSG2 (("gdbserver: unknown target exception 0x%08lx at 0x%s",
1320 current_event.u.Exception.ExceptionRecord.ExceptionCode, 1321 current_event.u.Exception.ExceptionRecord.ExceptionCode,
1321 phex_nz ((uintptr_t) current_event.u.Exception.ExceptionRecord. 1322 phex_nz ((uintptr_t) current_event.u.Exception.ExceptionRecord.
1322 ExceptionAddress, sizeof (uintptr_t)))); 1323 ExceptionAddress, sizeof (uintptr_t))));
1323 ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN; 1324 ourstatus->value.sig = GDB_SIGNAL_UNKNOWN;
1324 break; 1325 break;
1325 } 1326 }
1326 OUTMSG2 (("\n")); 1327 OUTMSG2 (("\n"));
1327 last_sig = ourstatus->value.sig; 1328 last_sig = ourstatus->value.sig;
1328 } 1329 }
1329 1330
1330 1331
1331 static void 1332 static void
1332 suspend_one_thread (struct inferior_list_entry *entry) 1333 suspend_one_thread (struct inferior_list_entry *entry)
1333 { 1334 {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 } 1372 }
1372 #endif 1373 #endif
1373 1374
1374 /* Get the next event from the child. */ 1375 /* Get the next event from the child. */
1375 1376
1376 static int 1377 static int
1377 get_child_debug_event (struct target_waitstatus *ourstatus) 1378 get_child_debug_event (struct target_waitstatus *ourstatus)
1378 { 1379 {
1379 ptid_t ptid; 1380 ptid_t ptid;
1380 1381
1381 last_sig = TARGET_SIGNAL_0; 1382 last_sig = GDB_SIGNAL_0;
1382 ourstatus->kind = TARGET_WAITKIND_SPURIOUS; 1383 ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
1383 1384
1384 /* Check if GDB sent us an interrupt request. */ 1385 /* Check if GDB sent us an interrupt request. */
1385 check_remote_input_interrupt_request (); 1386 check_remote_input_interrupt_request ();
1386 1387
1387 if (soft_interrupt_requested) 1388 if (soft_interrupt_requested)
1388 { 1389 {
1389 soft_interrupt_requested = 0; 1390 soft_interrupt_requested = 0;
1390 fake_breakpoint_event (); 1391 fake_breakpoint_event ();
1391 goto gotevent; 1392 goto gotevent;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 1522
1522 case LOAD_DLL_DEBUG_EVENT: 1523 case LOAD_DLL_DEBUG_EVENT:
1523 OUTMSG2 (("gdbserver: kernel event LOAD_DLL_DEBUG_EVENT " 1524 OUTMSG2 (("gdbserver: kernel event LOAD_DLL_DEBUG_EVENT "
1524 "for pid=%d tid=%x\n", 1525 "for pid=%d tid=%x\n",
1525 (unsigned) current_event.dwProcessId, 1526 (unsigned) current_event.dwProcessId,
1526 (unsigned) current_event.dwThreadId)); 1527 (unsigned) current_event.dwThreadId));
1527 CloseHandle (current_event.u.LoadDll.hFile); 1528 CloseHandle (current_event.u.LoadDll.hFile);
1528 handle_load_dll (); 1529 handle_load_dll ();
1529 1530
1530 ourstatus->kind = TARGET_WAITKIND_LOADED; 1531 ourstatus->kind = TARGET_WAITKIND_LOADED;
1531 ourstatus->value.sig = TARGET_SIGNAL_TRAP; 1532 ourstatus->value.sig = GDB_SIGNAL_TRAP;
1532 break; 1533 break;
1533 1534
1534 case UNLOAD_DLL_DEBUG_EVENT: 1535 case UNLOAD_DLL_DEBUG_EVENT:
1535 OUTMSG2 (("gdbserver: kernel event UNLOAD_DLL_DEBUG_EVENT " 1536 OUTMSG2 (("gdbserver: kernel event UNLOAD_DLL_DEBUG_EVENT "
1536 "for pid=%d tid=%x\n", 1537 "for pid=%d tid=%x\n",
1537 (unsigned) current_event.dwProcessId, 1538 (unsigned) current_event.dwProcessId,
1538 (unsigned) current_event.dwThreadId)); 1539 (unsigned) current_event.dwThreadId));
1539 handle_unload_dll (); 1540 handle_unload_dll ();
1540 ourstatus->kind = TARGET_WAITKIND_LOADED; 1541 ourstatus->kind = TARGET_WAITKIND_LOADED;
1541 ourstatus->value.sig = TARGET_SIGNAL_TRAP; 1542 ourstatus->value.sig = GDB_SIGNAL_TRAP;
1542 break; 1543 break;
1543 1544
1544 case EXCEPTION_DEBUG_EVENT: 1545 case EXCEPTION_DEBUG_EVENT:
1545 OUTMSG2 (("gdbserver: kernel event EXCEPTION_DEBUG_EVENT " 1546 OUTMSG2 (("gdbserver: kernel event EXCEPTION_DEBUG_EVENT "
1546 "for pid=%d tid=%x\n", 1547 "for pid=%d tid=%x\n",
1547 (unsigned) current_event.dwProcessId, 1548 (unsigned) current_event.dwProcessId,
1548 (unsigned) current_event.dwThreadId)); 1549 (unsigned) current_event.dwThreadId));
1549 handle_exception (ourstatus); 1550 handle_exception (ourstatus);
1550 break; 1551 break;
1551 1552
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 /* Initialize the Win32 backend. */ 1823 /* Initialize the Win32 backend. */
1823 void 1824 void
1824 initialize_low (void) 1825 initialize_low (void)
1825 { 1826 {
1826 set_target_ops (&win32_target_ops); 1827 set_target_ops (&win32_target_ops);
1827 if (the_low_target.breakpoint != NULL) 1828 if (the_low_target.breakpoint != NULL)
1828 set_breakpoint_data (the_low_target.breakpoint, 1829 set_breakpoint_data (the_low_target.breakpoint,
1829 the_low_target.breakpoint_len); 1830 the_low_target.breakpoint_len);
1830 the_low_target.arch_setup (); 1831 the_low_target.arch_setup ();
1831 } 1832 }
OLDNEW
« no previous file with comments | « gdb/gdbserver/tracepoint.c ('k') | gdb/gdbthread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698