void resume (ptid_t, int, enum gdb_signal) override;
- ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
+ ptid_t wait (ptid_t, struct target_waitstatus *, target_wait_flags) override;
void fetch_registers (struct regcache *, int) override;
void store_registers (struct regcache *, int) override;
ptid_t
go32_nat_target::wait (ptid_t ptid, struct target_waitstatus *status,
- int options)
+ target_wait_flags options)
{
int i;
unsigned char saved_opcode;
save_npx ();
#endif
- inferior_ptid = ptid_t (SOME_PID);
inf = current_inferior ();
inferior_appeared (inf, SOME_PID);
if (!target_is_pushed (this))
push_target (this);
- add_thread_silent (inferior_ptid);
+ thread_info *thr = add_thread_silent (ptid_t (SOME_PID));
+ switch_to_thread (thr);
clear_proceed_status (0);
insert_breakpoints ();
void
go32_nat_target::mourn_inferior ()
{
- ptid_t ptid;
-
redir_cmdline_delete (&child_cmd);
resume_signal = -1;
resume_is_step = 0;
the OS cleans up when the debuggee exits. */
x86_cleanup_dregs ();
- ptid = inferior_ptid;
- inferior_ptid = null_ptid;
prog_has_started = 0;
generic_mourn_inferior ();
/* CPUID with EAX = 0 returns the Vendor ID. */
#if 0
/* Ideally we would use x86_cpuid(), but it needs someone to run
- native tests first to make sure things actually work. They should.
- http://sourceware.org/ml/gdb-patches/2013-05/msg00164.html */
+ native tests first to make sure things actually work. They should.
+ http://sourceware.org/ml/gdb-patches/2013-05/msg00164.html */
unsigned int eax, ebx, ecx, edx;
if (x86_cpuid (0, &eax, &ebx, &ecx, &edx))
}
}
xsnprintf (cpu_string, sizeof (cpu_string), "%s%s Model %d Stepping %d",
- intel_p ? "Pentium" : (amd_p ? "AMD" : (hygon_p ? "Hygon" : "ix86")),
- cpu_brand, cpu_model, cpuid_eax & 0xf);
+ intel_p ? "Pentium" : (amd_p ? "AMD" : (hygon_p ? "Hygon" : "ix86")),
+ cpu_brand, cpu_model, cpuid_eax & 0xf);
printfi_filtered (31, "%s\n", cpu_string);
if (((cpuid_edx & (6 | (0x0d << 23))) != 0)
|| ((cpuid_edx & 1) == 0)
static struct cmd_list_element *info_dos_cmdlist = NULL;
-static void
-go32_info_dos_command (const char *args, int from_tty)
-{
- help_list (info_dos_cmdlist, "info dos ", class_info, gdb_stdout);
-}
-
void _initialize_go32_nat ();
void
_initialize_go32_nat ()
/* We are always processing GCC-compiled programs. */
processing_gcc_compilation = 2;
- add_prefix_cmd ("dos", class_info, go32_info_dos_command, _("\
+ add_basic_prefix_cmd ("dos", class_info, _("\
Print information specific to DJGPP (aka MS-DOS) debugging."),
- &info_dos_cmdlist, "info dos ", 0, &infolist);
+ &info_dos_cmdlist, "info dos ", 0, &infolist);
add_cmd ("sysinfo", class_info, go32_sysinfo, _("\
Display information about the target system, including CPU, OS, DPMI, etc."),