return make_my_cleanup (&cleanup_chain, do_freeargv, arg);
}
+static void
+do_bfd_close_cleanup (void *arg)
+{
+ bfd_close (arg);
+}
+
+struct cleanup *
+make_cleanup_bfd_close (bfd *abfd)
+{
+ return make_cleanup (do_bfd_close_cleanup, abfd);
+}
+
static void
do_ui_file_delete (void *arg)
{
free_current_contents (void *ptr)
{
void **location = ptr;
+ if (location == NULL)
+ internal_error ("free_current_contents: NULL pointer");
if (*location != NULL)
- free (*location);
+ {
+ free (*location);
+ *location = NULL;
+ }
}
/* Provide a known function that does nothing, to use as a base for
}
/* Try to get the message out */
+ target_terminal_ours ();
fputs_unfiltered ("gdb-internal-error: ", gdb_stderr);
vfprintf_unfiltered (gdb_stderr, fmt, ap);
fputs_unfiltered ("\n", gdb_stderr);
{
va_list ap;
va_start (ap, string);
+
internal_verror (string, ap);
va_end (ap);
}
var_boolean, (char *) &pagination_enabled,
"Set state of pagination.", &setlist),
&showlist);
+
if (xdb_commands)
{
add_com ("am", class_support, pagination_on_command,
}
return preg_str;
}
-
-/* Helper functions for INNER_THAN */
-int
-core_addr_lessthan (lhs, rhs)
- CORE_ADDR lhs;
- CORE_ADDR rhs;
-{
- return (lhs < rhs);
-}
-
-int
-core_addr_greaterthan (lhs, rhs)
- CORE_ADDR lhs;
- CORE_ADDR rhs;
-{
- return (lhs > rhs);
-}