common/filestuff.c (make_cleanup_close): Update comment.
[deliverable/binutils-gdb.git] / gdb / xml-syscall.c
index 1da693255aab555d089ac2cbe2b2f03541928e6e..31a80a532778d03e86ac773fc7f12166da99ee58 100644 (file)
@@ -1,7 +1,7 @@
 /* Functions that provide the mechanism to parse a syscall XML file
    and get its values.
 
-   Copyright (C) 2009-2014 Free Software Foundation, Inc.
+   Copyright (C) 2009-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -47,14 +47,13 @@ syscall_warn_user (void)
 }
 
 void
-set_xml_syscall_file_name (const struct gdbarch *gdbarch,
-                          const char *name)
+set_xml_syscall_file_name (struct gdbarch *gdbarch, const char *name)
 {
   return;
 }
 
 void
-get_syscall_by_number (const struct gdbarch *gdbarch,
+get_syscall_by_number (struct gdbarch *gdbarch,
                       int syscall_number, struct syscall *s)
 {
   syscall_warn_user ();
@@ -63,8 +62,8 @@ get_syscall_by_number (const struct gdbarch *gdbarch,
 }
 
 void
-get_syscall_by_name (const struct gdbarch *gdbarch,
-                    const char *syscall_name, struct syscall *s)
+get_syscall_by_name (struct gdbarch *gdbarch, const char *syscall_name,
+                    struct syscall *s)
 {
   syscall_warn_user ();
   s->number = UNKNOWN_SYSCALL;
@@ -72,7 +71,7 @@ get_syscall_by_name (const struct gdbarch *gdbarch,
 }
 
 const char **
-get_syscall_names (const struct gdbarch *gdbarch)
+get_syscall_names (struct gdbarch *gdbarch)
 {
   syscall_warn_user ();
   return NULL;
@@ -130,7 +129,7 @@ syscalls_info_free_syscalls_desc (struct syscall_desc *sd)
 static void
 free_syscalls_info (void *arg)
 {
-  struct syscalls_info *syscalls_info = arg;
+  struct syscalls_info *syscalls_info = (struct syscalls_info *) arg;
   struct syscall_desc *sysdesc;
   int i;
 
@@ -172,7 +171,7 @@ syscall_start_syscall (struct gdb_xml_parser *parser,
                        const struct gdb_xml_element *element,
                        void *user_data, VEC(gdb_xml_value_s) *attributes)
 {
-  struct syscall_parsing_data *data = user_data;
+  struct syscall_parsing_data *data = (struct syscall_parsing_data *) user_data;
   struct gdb_xml_value *attrs = VEC_address (gdb_xml_value_s, attributes);
   int len, i;
   /* syscall info.  */
@@ -184,7 +183,7 @@ syscall_start_syscall (struct gdb_xml_parser *parser,
   for (i = 0; i < len; i++)
     {
       if (strcmp (attrs[i].name, "name") == 0)
-        name = attrs[i].value;
+        name = (char *) attrs[i].value;
       else if (strcmp (attrs[i].name, "number") == 0)
         number = * (ULONGEST *) attrs[i].value;
       else
@@ -377,7 +376,7 @@ xml_list_of_syscalls (struct gdbarch *gdbarch)
     return NULL;
 
   nsyscalls = VEC_length (syscall_desc_p, syscalls_info->syscalls);
-  names = xmalloc ((nsyscalls + 1) * sizeof (char *));
+  names = XNEWVEC (const char *, nsyscalls + 1);
 
   for (i = 0;
        VEC_iterate (syscall_desc_p, syscalls_info->syscalls, i, sysdesc);
This page took 0.024896 seconds and 4 git commands to generate.