`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.
+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.
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);
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
(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;
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);
}
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)
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;
}
(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 =
(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 =
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);
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);
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);
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);
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);
{
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);
}
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);
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);
}
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);
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)
/* 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. */
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");
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;
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;
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;
/* 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)
{
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
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)
{
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. */