* ax-gdb.c (agent_command): Remove now useless cast of
authorPhilippe De Muyter <phdm@macqel.be>
Wed, 26 Apr 2000 12:41:48 +0000 (12:41 +0000)
committerPhilippe De Muyter <phdm@macqel.be>
Wed, 26 Apr 2000 12:41:48 +0000 (12:41 +0000)
`free_current_contents' when passed to `make_cleanup'.
* coffread.c (coff_symfile_read): Ditto.
* dwarf2read.c (dwarf2_add_member_fn, read_array_type): Ditto.
(dwarf_decode_lines): Ditto.
* eval.c (parse_and_eval_address, parse_and_eval_address_1): Ditto.
(parse_and_eval, parse_to_comma_and_eval): Ditto.
* parse.c (parse_exp_1): Ditto.
* printcmd.c (print_command_1, output_command, set_command): Ditto.
(x_command, print_frame_args, printf_command): Ditto.
* top.c (execute_control_command): Ditto.
* tracepoint.c (validate_actionline): Ditto.
* typeprint.c (whatis_exp, ptype_command): Ditto.
(maintenance_print_type): Ditto.

gdb/ChangeLog
gdb/ax-gdb.c
gdb/coffread.c
gdb/dwarf2read.c
gdb/eval.c
gdb/parse.c
gdb/printcmd.c
gdb/top.c
gdb/tracepoint.c
gdb/typeprint.c

index 077887a0b58fc408aa141355a79d0bfd84152265..f9f5dcefdaef1afa308fa1aafe2d8f0b6992078c 100644 (file)
@@ -1,3 +1,20 @@
+Wed Apr 26 13:50:35 2000  Philippe De Muyter  <phdm@macqel.be>
+
+       * ax-gdb.c (agent_command): Remove now useless cast of
+       `free_current_contents' when passed to `make_cleanup'.
+       * coffread.c (coff_symfile_read): Ditto.
+       * dwarf2read.c (dwarf2_add_member_fn, read_array_type): Ditto.
+       (dwarf_decode_lines): Ditto.
+       * eval.c (parse_and_eval_address, parse_and_eval_address_1): Ditto.
+       (parse_and_eval, parse_to_comma_and_eval): Ditto.
+       * parse.c (parse_exp_1): Ditto.
+       * printcmd.c (print_command_1, output_command, set_command): Ditto.
+       (x_command, print_frame_args, printf_command): Ditto.
+       * top.c (execute_control_command): Ditto.
+       * tracepoint.c (validate_actionline): Ditto.
+       * typeprint.c (whatis_exp, ptype_command): Ditto.
+       (maintenance_print_type): Ditto.
+
 2000-04-26  Kevin Buettner  <kevinb@redhat.com>
 
        * Makefile.in (ALLDEPFILES): Add ia64-linux-tdep.c.
index 890731bf40a6937b3cd9bf0a59644523d82ac666..291ac75d8e25711f4d75307cc7ef36ef12e5a0ba 100644 (file)
@@ -1923,7 +1923,7 @@ agent_command (exp, from_tty)
     error_no_arg ("expression to translate");
 
   expr = parse_expression (exp);
-  old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+  old_chain = make_cleanup (free_current_contents, &expr);
   agent = gen_trace_for_expr (fi->pc, expr);
   make_cleanup ((make_cleanup_func) free_agent_expr, agent);
   ax_print (gdb_stdout, agent);
index b3c191b7b3530fbf10ac634f4f7292788fa06eb3..75a90f737cf4b7ec66d15116d3d9ebb38843efe4 100644 (file)
@@ -638,7 +638,7 @@ coff_symfile_read (objfile, mainline)
   temp_sym = (char *) xmalloc
     (cdata->local_symesz + cdata->local_auxesz);
   temp_aux = temp_sym + cdata->local_symesz;
-  back_to = make_cleanup ((make_cleanup_func) free_current_contents, &temp_sym);
+  back_to = make_cleanup (free_current_contents, &temp_sym);
 
   /* We need to know whether this is a PE file, because in PE files,
      unlike standard COFF files, symbol values are stored as offsets
index b8b648ac8d05915ff641ec715d5c6f79b048d762..efc85badaff59bb6cf92de3140ce2eafa8d73ef6 100644 (file)
@@ -1998,8 +1998,7 @@ dwarf2_add_member_fn (fip, die, type, objfile)
                      (fip->nfnfields + DW_FIELD_ALLOC_CHUNK)
                      * sizeof (struct fnfieldlist));
          if (fip->nfnfields == 0)
-           make_cleanup ((make_cleanup_func) free_current_contents,
-                         &fip->fnfieldlists);
+           make_cleanup (free_current_contents, &fip->fnfieldlists);
        }
       flp = &fip->fnfieldlists[fip->nfnfields];
       flp->name = fieldname;
@@ -2506,8 +2505,7 @@ read_array_type (die, objfile)
                xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK)
                          * sizeof (struct type *));
              if (ndim == 0)
-               make_cleanup ((make_cleanup_func) free_current_contents,
-                             &range_types);
+               make_cleanup (free_current_contents, &range_types);
            }
          range_types[ndim++] = create_range_type (NULL, index_type, low, high);
        }
@@ -3760,8 +3758,7 @@ dwarf_decode_lines (offset, comp_dir, abfd)
   line_ptr += 1;
   lh.standard_opcode_lengths = (unsigned char *)
     xmalloc (lh.opcode_base * sizeof (unsigned char));
-  back_to = make_cleanup ((make_cleanup_func) free_current_contents,
-                         &lh.standard_opcode_lengths);
+  back_to = make_cleanup (free_current_contents, &lh.standard_opcode_lengths);
 
   lh.standard_opcode_lengths[0] = 1;
   for (i = 1; i < lh.opcode_base; ++i)
@@ -3780,7 +3777,7 @@ dwarf_decode_lines (offset, comp_dir, abfd)
            xrealloc (dirs.dirs,
                      (dirs.num_dirs + DIR_ALLOC_CHUNK) * sizeof (char *));
          if (dirs.num_dirs == 0)
-           make_cleanup ((make_cleanup_func) free_current_contents, &dirs.dirs);
+           make_cleanup (free_current_contents, &dirs.dirs);
        }
       dirs.dirs[dirs.num_dirs++] = cur_dir;
     }
@@ -3797,8 +3794,7 @@ dwarf_decode_lines (offset, comp_dir, abfd)
                      (files.num_files + FILE_ALLOC_CHUNK)
                      * sizeof (struct fileinfo));
          if (files.num_files == 0)
-           make_cleanup ((make_cleanup_func) free_current_contents,
-                         &files.files);
+           make_cleanup (free_current_contents, &files.files);
        }
       files.files[files.num_files].name = cur_file;
       files.files[files.num_files].dir =
@@ -3873,8 +3869,7 @@ dwarf_decode_lines (offset, comp_dir, abfd)
                                  (files.num_files + FILE_ALLOC_CHUNK)
                                  * sizeof (struct fileinfo));
                      if (files.num_files == 0)
-                       make_cleanup ((make_cleanup_func) free_current_contents,
-                                     &files.files);
+                       make_cleanup (free_current_contents, &files.files);
                    }
                  files.files[files.num_files].name = cur_file;
                  files.files[files.num_files].dir =
index 06ec1914eba44f753bf7ea4f9e091acc6272ed63..9bbaa68244d8964243fddd56be3a3f58a70d9d84 100644 (file)
@@ -85,7 +85,7 @@ parse_and_eval_address (exp)
   struct expression *expr = parse_expression (exp);
   register CORE_ADDR addr;
   register struct cleanup *old_chain =
-  make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+  make_cleanup (free_current_contents, &expr);
 
   addr = value_as_pointer (evaluate_expression (expr));
   do_cleanups (old_chain);
@@ -102,7 +102,7 @@ parse_and_eval_address_1 (expptr)
   struct expression *expr = parse_exp_1 (expptr, (struct block *) 0, 0);
   register CORE_ADDR addr;
   register struct cleanup *old_chain =
-  make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+  make_cleanup (free_current_contents, &expr);
 
   addr = value_as_pointer (evaluate_expression (expr));
   do_cleanups (old_chain);
@@ -116,7 +116,7 @@ parse_and_eval (exp)
   struct expression *expr = parse_expression (exp);
   register value_ptr val;
   register struct cleanup *old_chain
-  = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+  = make_cleanup (free_current_contents, &expr);
 
   val = evaluate_expression (expr);
   do_cleanups (old_chain);
@@ -134,7 +134,7 @@ parse_to_comma_and_eval (expp)
   struct expression *expr = parse_exp_1 (expp, (struct block *) 0, 1);
   register value_ptr val;
   register struct cleanup *old_chain
-  = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+  = make_cleanup (free_current_contents, &expr);
 
   val = evaluate_expression (expr);
   do_cleanups (old_chain);
index 7a5db47f2b0f3aeb36e3c93c842089b027caa25c..5997fae636a3ca6b178cd314217ea8f155b9d6ab 100644 (file)
@@ -1176,7 +1176,7 @@ parse_exp_1 (stringptr, block, comma)
   expout = (struct expression *)
     xmalloc (sizeof (struct expression) + EXP_ELEM_TO_BYTES (expout_size));
   expout->language_defn = current_language;
-  make_cleanup ((make_cleanup_func) free_current_contents, &expout);
+  make_cleanup (free_current_contents, &expout);
 
   if (current_language->la_parser ())
     current_language->la_error (NULL);
index a74ffa2c370007ca0ec0bd3ea1ea1a6cb8284a99..85571ab305ee1e887527167e1aeaf05e24b20b16 100644 (file)
@@ -935,8 +935,7 @@ print_command_1 (exp, inspect, voidprint)
     {
       struct type *type;
       expr = parse_expression (exp);
-      old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
-                               &expr);
+      old_chain = make_cleanup (free_current_contents, &expr);
       cleanup = 1;
       val = evaluate_expression (expr);
 
@@ -1049,7 +1048,7 @@ output_command (exp, from_tty)
     }
 
   expr = parse_expression (exp);
-  old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+  old_chain = make_cleanup (free_current_contents, &expr);
 
   val = evaluate_expression (expr);
 
@@ -1072,8 +1071,8 @@ set_command (exp, from_tty)
      int from_tty;
 {
   struct expression *expr = parse_expression (exp);
-  register struct cleanup *old_chain
-  = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+  register struct cleanup *old_chain =
+    make_cleanup (free_current_contents, &expr);
   evaluate_expression (expr);
   do_cleanups (old_chain);
 }
@@ -1370,8 +1369,7 @@ x_command (exp, from_tty)
          But don't clobber a user-defined command's definition.  */
       if (from_tty)
        *exp = 0;
-      old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
-                               &expr);
+      old_chain = make_cleanup (free_current_contents, &expr);
       val = evaluate_expression (expr);
       if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_REF)
        val = value_ind (val);
@@ -1854,7 +1852,7 @@ print_frame_args (func, fi, num, stream)
   struct ui_stream *stb;
 
   stb = ui_out_stream_new (uiout);
-  old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
+  old_chain = make_cleanup (ui_out_stream_delete, stb);
 #endif /* UI_OUT */
 
   if (func)
@@ -1881,8 +1879,8 @@ print_frame_args (func, fi, num, stream)
 
            /* Compute address of next argument by adding the size of
               this argument and rounding to an int boundary.  */
-           current_offset
-             ((current_offset + arg_size + sizeof (int) - 1)
+           current_offset =
+             ((current_offset + arg_size + sizeof (int) - 1)
                 & ~(sizeof (int) - 1));
 
            /* If this is the highest offset seen yet, set highest_offset.  */
@@ -2110,8 +2108,7 @@ printf_command (arg, from_tty)
   struct cleanup *old_cleanups;
 
   val_args = (value_ptr *) xmalloc (allocated_args * sizeof (value_ptr));
-  old_cleanups = make_cleanup ((make_cleanup_func) free_current_contents,
-                              &val_args);
+  old_cleanups = make_cleanup (free_current_contents, &val_args);
 
   if (s == 0)
     error_no_arg ("format-control string and values to print");
index 0959d4151e71f1e662d156e74126d8b497ccf577..3698fbc14900710e89e1d2316dacad396d5fa01c 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1094,8 +1094,7 @@ execute_control_command (cmd)
       new_line = insert_args (cmd->line);
       if (!new_line)
        return invalid_control;
-      old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
-                               &new_line);
+      old_chain = make_cleanup (free_current_contents, &new_line);
       execute_command (new_line, 0);
       ret = cmd->control_type;
       break;
@@ -1113,10 +1112,9 @@ execute_control_command (cmd)
        new_line = insert_args (cmd->line);
        if (!new_line)
          return invalid_control;
-       old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
-                                 &new_line);
+       old_chain = make_cleanup (free_current_contents, &new_line);
        expr = parse_expression (new_line);
-       make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+       make_cleanup (free_current_contents, &expr);
 
        ret = simple_control;
        loop = 1;
@@ -1174,11 +1172,10 @@ execute_control_command (cmd)
        new_line = insert_args (cmd->line);
        if (!new_line)
          return invalid_control;
-       old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
-                                 &new_line);
+       old_chain = make_cleanup (free_current_contents, &new_line);
        /* Parse the conditional for the if statement.  */
        expr = parse_expression (new_line);
-       make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+       make_cleanup (free_current_contents, &expr);
 
        current = NULL;
        ret = simple_control;
index 95f79c19f30e7985a9fc15d6158f9bf6b78c39b7..58db9b36acfc06d571cfc3484fe750aeec69d97d 100644 (file)
@@ -977,8 +977,7 @@ validate_actionline (line, t)
              /* else fall thru, treat p as an expression and parse it! */
            }
          exp = parse_exp_1 (&p, block_for_pc (t->address), 1);
-         old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
-                                   &exp);
+         old_chain = make_cleanup (free_current_contents, &exp);
 
          if (exp->elts[0].opcode == OP_VAR_VALUE)
            {
index 5b46cba24648b1e515656afbe9edac8bebc4010e..9050e82afcf805f5d02ab53bfea702db17ab29d6 100644 (file)
@@ -90,8 +90,7 @@ whatis_exp (exp, show)
   if (exp)
     {
       expr = parse_expression (exp);
-      old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
-                               &expr);
+      old_chain = make_cleanup (free_current_contents, &expr);
       val = evaluate_type (expr);
     }
   else
@@ -185,8 +184,7 @@ ptype_command (typename, from_tty)
   else
     {
       expr = parse_expression (typename);
-      old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
-                               &expr);
+      old_chain = make_cleanup (free_current_contents, &expr);
       type = ptype_eval (expr);
       if (type != NULL)
        {
@@ -306,7 +304,7 @@ maintenance_print_type (typename, from_tty)
   if (typename != NULL)
     {
       expr = parse_expression (typename);
-      old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
+      old_chain = make_cleanup (free_current_contents, &expr);
       if (expr->elts[0].opcode == OP_TYPE)
        {
          /* The user expression names a type directly, just use that type. */