#define AdjustTokenPrivileges dyn_AdjustTokenPrivileges
#define DebugActiveProcessStop dyn_DebugActiveProcessStop
#define AdjustTokenPrivileges dyn_AdjustTokenPrivileges
#define DebugActiveProcessStop dyn_DebugActiveProcessStop
WaitForDebugEvent */
static HANDLE current_process_handle; /* Currently executing process */
static windows_thread_info *current_thread; /* Info on currently selected thread */
WaitForDebugEvent */
static HANDLE current_process_handle; /* Currently executing process */
static windows_thread_info *current_thread; /* Info on currently selected thread */
else if (print_thread_events && !main_thread_p)
printf_unfiltered (_("[%s exited with code %u]\n"),
else if (print_thread_events && !main_thread_p)
printf_unfiltered (_("[%s exited with code %u]\n"),
ourstatus->kind = TARGET_WAITKIND_STOPPED;
retval = strtoul (p, &p, 0);
if (!retval)
ourstatus->kind = TARGET_WAITKIND_STOPPED;
retval = strtoul (p, &p, 0);
if (!retval)
else if ((x = (LPCVOID) (uintptr_t) strtoull (p, NULL, 0))
&& ReadProcessMemory (current_process_handle, x,
&saved_context,
else if ((x = (LPCVOID) (uintptr_t) strtoull (p, NULL, 0))
&& ReadProcessMemory (current_process_handle, x,
&saved_context,
}
if ((info.HighWord.Bits.Type & 0x1) == 0)
puts_filtered(", N.Acc");
puts_filtered (")\n");
if ((info.HighWord.Bits.Type & 0x10) == 0)
puts_filtered("System selector ");
}
if ((info.HighWord.Bits.Type & 0x1) == 0)
puts_filtered(", N.Acc");
puts_filtered (")\n");
if ((info.HighWord.Bits.Type & 0x10) == 0)
puts_filtered("System selector ");
current_thread
= windows_add_thread (ptid_t (current_event.dwProcessId, 0,
current_event.dwThreadId),
current_event.u.CreateThread.hThread,
current_event.u.CreateThread.lpThreadLocalBase,
true /* main_thread_p */);
current_thread
= windows_add_thread (ptid_t (current_event.dwProcessId, 0,
current_event.dwThreadId),
current_event.u.CreateThread.hThread,
current_event.u.CreateThread.lpThreadLocalBase,
true /* main_thread_p */);
/* Add the main thread. */
th = windows_add_thread
(ptid_t (current_event.dwProcessId, 0,
/* Add the main thread. */
th = windows_add_thread
(ptid_t (current_event.dwProcessId, 0,
else if (saw_create == 1)
{
windows_delete_thread (ptid_t (current_event.dwProcessId, 0,
else if (saw_create == 1)
{
windows_delete_thread (ptid_t (current_event.dwProcessId, 0,
0, true /* main_thread_p */);
ourstatus->kind = TARGET_WAITKIND_EXITED;
ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode;
0, true /* main_thread_p */);
ourstatus->kind = TARGET_WAITKIND_EXITED;
ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode;
catch_errors (handle_load_dll);
ourstatus->kind = TARGET_WAITKIND_LOADED;
ourstatus->value.integer = 0;
catch_errors (handle_load_dll);
ourstatus->kind = TARGET_WAITKIND_LOADED;
ourstatus->value.integer = 0;
catch_errors (handle_unload_dll);
ourstatus->kind = TARGET_WAITKIND_LOADED;
ourstatus->value.integer = 0;
catch_errors (handle_unload_dll);
ourstatus->kind = TARGET_WAITKIND_LOADED;
ourstatus->value.integer = 0;
if (exec_file)
printf_unfiltered ("Attaching to program `%s', %s\n", exec_file,
if (exec_file)
printf_unfiltered ("Attaching to program `%s', %s\n", exec_file,
exec_file = "";
printf_unfiltered ("Detaching from program: %s, Pid %u\n", exec_file,
(unsigned) current_event.dwProcessId);
exec_file = "";
printf_unfiltered ("Detaching from program: %s, Pid %u\n", exec_file,
(unsigned) current_event.dwProcessId);
printf_unfiltered ("\tUsing the running image of %s %s.\n",
inf->attach_flag ? "attached" : "child",
printf_unfiltered ("\tUsing the running image of %s %s.\n",
inf->attach_flag ? "attached" : "child",
- {
- snprintf (buf, sizeof (buf), "Thread %d.0x%lx",
- ptid.pid (), ptid.tid ());
- return buf;
- }
+ return string_printf ("Thread %d.0x%lx", ptid.pid (), ptid.tid ());