aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe De Muyter <phdm@macqel.be>2000-04-26 12:41:48 +0000
committerPhilippe De Muyter <phdm@macqel.be>2000-04-26 12:41:48 +0000
commitc13c43fdda3d022918e2ab2211caf52643eab25a (patch)
tree8381200be9f4cb3fed65dade7481217f8fbfc86c
parent4fd99b5a5d7043354dd66b991b273bb922fcfc57 (diff)
downloadfsf-binutils-gdb-c13c43fdda3d022918e2ab2211caf52643eab25a.zip
fsf-binutils-gdb-c13c43fdda3d022918e2ab2211caf52643eab25a.tar.gz
fsf-binutils-gdb-c13c43fdda3d022918e2ab2211caf52643eab25a.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog17
-rw-r--r--gdb/ax-gdb.c2
-rw-r--r--gdb/coffread.c2
-rw-r--r--gdb/dwarf2read.c17
-rw-r--r--gdb/eval.c8
-rw-r--r--gdb/parse.c2
-rw-r--r--gdb/printcmd.c21
-rw-r--r--gdb/top.c13
-rw-r--r--gdb/tracepoint.c3
-rw-r--r--gdb/typeprint.c8
10 files changed, 48 insertions, 45 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 077887a..f9f5dcef 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 890731b..291ac75 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -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);
diff --git a/gdb/coffread.c b/gdb/coffread.c
index b3c191b..75a90f7 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -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
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index b8b648a..efc85ba 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -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 =
diff --git a/gdb/eval.c b/gdb/eval.c
index 06ec191..9bbaa68 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -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);
diff --git a/gdb/parse.c b/gdb/parse.c
index 7a5db47..5997fae 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -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);
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index a74ffa2..85571ab 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -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");
diff --git a/gdb/top.c b/gdb/top.c
index 0959d41..3698fbc 100644
--- 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;
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 95f79c1..58db9b3 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -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)
{
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 5b46cba..9050e82 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -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. */