gdb/riscv: Add gdb to dwarf register number mapping
[deliverable/binutils-gdb.git] / gdb / i386-cygwin-tdep.c
index a4f64e515d01c9c3f16aa3bec85e531eedce6cfd..ed75ea37419906c65001fbddb13f85cfed3bbfeb 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Cygwin running on i386's, for GDB.
 
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -98,7 +98,7 @@ struct cpms_data
 static void
 core_process_module_section (bfd *abfd, asection *sect, void *obj)
 {
-  struct cpms_data *data = obj;
+  struct cpms_data *data = (struct cpms_data *) obj;
   enum bfd_endian byte_order = gdbarch_byte_order (data->gdbarch);
 
   char *module_name;
@@ -107,10 +107,10 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj)
 
   gdb_byte *buf = NULL;
 
-  if (strncmp (sect->name, ".module", 7) != 0)
+  if (!startswith (sect->name, ".module"))
     return;
 
-  buf = xmalloc (bfd_get_section_size (sect) + 1);
+  buf = (gdb_byte *) xmalloc (bfd_get_section_size (sect) + 1);
   if (!buf)
     {
       printf_unfiltered ("memory allocation failed for %s\n", sect->name);
@@ -163,7 +163,7 @@ windows_core_xfer_shared_libraries (struct gdbarch *gdbarch,
                         &data);
   obstack_grow_str0 (&obstack, "</library-list>\n");
 
-  buf = obstack_finish (&obstack);
+  buf = (const char *) obstack_finish (&obstack);
   len_avail = strlen (buf);
   if (offset >= len_avail)
     return 0;
@@ -178,14 +178,14 @@ windows_core_xfer_shared_libraries (struct gdbarch *gdbarch,
 
 /* This is how we want PTIDs from core files to be printed.  */
 
-static char *
+static const char *
 i386_windows_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
 {
   static char buf[80];
 
-  if (ptid_get_lwp (ptid) != 0)
+  if (ptid.lwp () != 0)
     {
-      snprintf (buf, sizeof (buf), "Thread 0x%lx", ptid_get_lwp (ptid));
+      snprintf (buf, sizeof (buf), "Thread 0x%lx", ptid.lwp ());
       return buf;
     }
 
@@ -252,9 +252,6 @@ i386_cygwin_osabi_sniffer (bfd *abfd)
   return GDB_OSABI_UNKNOWN;
 }
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_i386_cygwin_tdep (void);
-
 void
 _initialize_i386_cygwin_tdep (void)
 {
This page took 0.02496 seconds and 4 git commands to generate.