mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 10:09:16 +08:00
1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid possible nested-if confusion. * breakpoint.c (breakpoint_here_p): Ditto. (breakpoint_inserted_here_p): Ditto. (breakpoint_thread_match): Ditto. * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined. * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability prototypes. * symtab.h: Add prototype for _initialize_source. * value.h: Add prototype for _initialize_value. * defs.h: Include sys/types.h or stddef.h to get size_t. (make_cleanup): Add make_cleanup_func typedef and switch to using a prototype for this function. (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't using mmalloc. * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c: Cast parameters passed to make_cleanup to use the new make_cleanup_func typedef. More warning cleanups. There are still a bunch of places where the first argument to make_cleanup is not cast to (make_cleanup_func); these are either due to the function fitting the make_cleanup_func specification already (e.g. free()) or they are in files that weren't compiled when I did my make on a Linux native system. Bwahahaha. You can see them like this: grep make_cleanup\ * | grep -v make_cleanup_func I'll surely go back and clean up the remaining suspicious calls in GDB one of these days. :-)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* Print values for GNU debugger GDB.
|
||||
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1995
|
||||
Copyright 1986, 87, 88, 89, 90, 91, 93, 94, 95, 1998
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
@ -175,6 +175,8 @@ static struct format_data decode_format PARAMS ((char **, int, int));
|
||||
|
||||
static int print_insn PARAMS ((CORE_ADDR, GDB_FILE *));
|
||||
|
||||
static void sym_info PARAMS ((char *, int));
|
||||
|
||||
|
||||
/* Decode a format specification. *STRING_PTR should point to it.
|
||||
OFORMAT and OSIZE are used as defaults for the format and size
|
||||
@ -830,7 +832,8 @@ print_command_1 (exp, inspect, voidprint)
|
||||
extern int objectprint;
|
||||
struct type *type;
|
||||
expr = parse_expression (exp);
|
||||
old_chain = make_cleanup (free_current_contents, &expr);
|
||||
old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
|
||||
&expr);
|
||||
cleanup = 1;
|
||||
val = evaluate_expression (expr);
|
||||
|
||||
@ -943,7 +946,7 @@ output_command (exp, from_tty)
|
||||
}
|
||||
|
||||
expr = parse_expression (exp);
|
||||
old_chain = make_cleanup (free_current_contents, &expr);
|
||||
old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr);
|
||||
|
||||
val = evaluate_expression (expr);
|
||||
|
||||
@ -964,7 +967,7 @@ set_command (exp, from_tty)
|
||||
{
|
||||
struct expression *expr = parse_expression (exp);
|
||||
register struct cleanup *old_chain
|
||||
= make_cleanup (free_current_contents, &expr);
|
||||
= make_cleanup ((make_cleanup_func) free_current_contents, &expr);
|
||||
evaluate_expression (expr);
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
@ -1241,7 +1244,8 @@ x_command (exp, from_tty)
|
||||
But don't clobber a user-defined command's definition. */
|
||||
if (from_tty)
|
||||
*exp = 0;
|
||||
old_chain = make_cleanup (free_current_contents, &expr);
|
||||
old_chain = make_cleanup ((make_cleanup_func) free_current_contents,
|
||||
&expr);
|
||||
val = evaluate_expression (expr);
|
||||
if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_REF)
|
||||
val = value_ind (val);
|
||||
@ -1928,7 +1932,8 @@ printf_command (arg, from_tty)
|
||||
struct cleanup *old_cleanups;
|
||||
|
||||
val_args = (value_ptr *) xmalloc (allocated_args * sizeof (value_ptr));
|
||||
old_cleanups = make_cleanup (free_current_contents, &val_args);
|
||||
old_cleanups = make_cleanup ((make_cleanup_func) free_current_contents,
|
||||
&val_args);
|
||||
|
||||
if (s == 0)
|
||||
error_no_arg ("format-control string and values to print");
|
||||
@ -2198,7 +2203,6 @@ disassemble_command (arg, from_tty)
|
||||
char *name;
|
||||
CORE_ADDR pc, pc_masked;
|
||||
char *space_index;
|
||||
asection *section;
|
||||
|
||||
name = NULL;
|
||||
if (!arg)
|
||||
|
Reference in New Issue
Block a user