/* Native debugging support for Intel x86 running DJGPP.
- Copyright (C) 1997-2017 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
Written by Robert Hoehne.
This file is part of GDB.
static void
fetch_register (struct regcache *regcache, int regno)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
if (regno < gdbarch_fp0_regnum (gdbarch))
regcache_raw_supply (regcache, regno,
(char *) &a_tss + regno_mapping[regno].tss_ofs);
else
{
for (regno = 0;
- regno < gdbarch_fp0_regnum (get_regcache_arch (regcache));
+ regno < gdbarch_fp0_regnum (regcache->arch ());
regno++)
fetch_register (regcache, regno);
i387_supply_fsave (regcache, -1, &npx);
static void
store_register (const struct regcache *regcache, int regno)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch *gdbarch = regcache->arch ();
if (regno < gdbarch_fp0_regnum (gdbarch))
regcache_raw_collect (regcache, regno,
(char *) &a_tss + regno_mapping[regno].tss_ofs);
store_register (regcache, regno);
else
{
- for (r = 0; r < gdbarch_fp0_regnum (get_regcache_arch (regcache)); r++)
+ for (r = 0; r < gdbarch_fp0_regnum (regcache->arch ()); r++)
store_register (regcache, r);
i387_collect_fsave (regcache, -1, &npx);
}
}
static void
-go32_create_inferior (struct target_ops *ops, char *exec_file,
- char *args, char **env, int from_tty)
+go32_create_inferior (struct target_ops *ops,
+ const char *exec_file,
+ const std::string &allargs, char **env, int from_tty)
{
extern char **environ;
jmp_buf start_state;
size_t cmdlen;
struct inferior *inf;
int result;
+ const char *args = allargs.c_str ();
/* If no exec file handed to us, get it from the exec-file command -- with
a good, common error message if none is specified. */
}
}
+static void
+go32_pass_ctrlc (struct target_ops *self)
+{
+}
+
static int
go32_thread_alive (struct target_ops *ops, ptid_t ptid)
{
t->to_terminal_ours_for_output = go32_terminal_ours;
t->to_terminal_ours = go32_terminal_ours;
t->to_terminal_info = go32_terminal_info;
+ t->to_pass_ctrlc = go32_pass_ctrlc;
t->to_kill = go32_kill_inferior;
t->to_create_inferior = go32_create_inferior;
t->to_mourn_inferior = go32_mourn_inferior;
/* Display assorted information about the underlying OS. */
static void
-go32_sysinfo (char *arg, int from_tty)
+go32_sysinfo (const char *arg, int from_tty)
{
static const char test_pattern[] =
"deadbeafdeadbeafdeadbeafdeadbeafdeadbeaf"
/* CPUID with EAX = 1 returns processor signature and features. */
if (cpuid_max >= 1)
{
- static char *brand_name[] = {
+ static const char *brand_name[] = {
"",
" Celeron",
" III",
}
static void
-go32_sldt (char *arg, int from_tty)
+go32_sldt (const char *arg, int from_tty)
{
struct dtr_reg gdtr;
unsigned short ldtr = 0;
}
static void
-go32_sgdt (char *arg, int from_tty)
+go32_sgdt (const char *arg, int from_tty)
{
struct dtr_reg gdtr;
long gdt_entry = -1L;
}
static void
-go32_sidt (char *arg, int from_tty)
+go32_sidt (const char *arg, int from_tty)
{
struct dtr_reg idtr;
long idt_entry = -1L;
}
static void
-go32_pde (char *arg, int from_tty)
+go32_pde (const char *arg, int from_tty)
{
long pde_idx = -1, i;
}
static void
-go32_pte (char *arg, int from_tty)
+go32_pte (const char *arg, int from_tty)
{
long pde_idx = -1L, i;
}
static void
-go32_pte_for_address (char *arg, int from_tty)
+go32_pte_for_address (const char *arg, int from_tty)
{
CORE_ADDR addr = 0, i;
static struct cmd_list_element *info_dos_cmdlist = NULL;
static void
-go32_info_dos_command (char *args, int from_tty)
+go32_info_dos_command (const char *args, int from_tty)
{
help_list (info_dos_cmdlist, "info dos ", class_info, gdb_stdout);
}
-/* -Wmissing-prototypes */
-extern initialize_file_ftype _initialize_go32_nat;
-
void
_initialize_go32_nat (void)
{