point in the chain. Use discard_cleanups to remove cleanups
from the chain back to a given point, not doing them.
- If the argument is pointer to allocated memory, then you need to
+ If the argument is pointer to allocated memory, then you need
to additionally set the 'free_arg' member to a function that will
free that memory. This function will be called both when the cleanup
is executed and when it's discarded. */
void *arg;
};
-/* Be conservative and use enum bitfields only with GCC.
- This is copied from gcc 3.3.1, system.h. */
-
-#if defined(__GNUC__) && (__GNUC__ >= 2)
-#define ENUM_BITFIELD(TYPE) enum TYPE
-#else
-#define ENUM_BITFIELD(TYPE) unsigned int
-#endif
-
/* vec.h-style vectors of strings want a typedef for char * . */
typedef char * char_ptr;
struct breakpoint;
struct frame_info;
struct gdbarch;
+struct value;
+
+/* From main.c. */
+
+/* This really belong in utils.c (path-utils.c?), but it references some
+ globals that are currently only available to main.c. */
+extern char *relocate_gdb_directory (const char *initial, int flag);
/* From utils.c */
extern struct cleanup *
make_cleanup_restore_ui_file (struct ui_file **variable);
+extern struct cleanup *make_cleanup_value_free_to_mark (struct value *);
+extern struct cleanup *make_cleanup_value_free (struct value *);
+
extern struct cleanup *make_final_cleanup (make_cleanup_ftype *, void *);
extern struct cleanup *make_my_cleanup (struct cleanup **,
This is usually formatted similar to 0x%lx. */
extern const char *paddress (struct gdbarch *gdbarch, CORE_ADDR addr);
+/* Return a string representation in hexadecimal notation of ADDRESS,
+ which is suitable for printing. */
+
+extern const char *print_core_address (struct gdbarch *gdbarch,
+ CORE_ADDR address);
+
/* %d for LONGEST */
extern char *plongest (LONGEST l);
/* %u for ULONGEST */
extern void initialize_progspace (void);
extern void initialize_inferiors (void);
+/* Special block numbers */
+
+enum block_enum
+{
+ GLOBAL_BLOCK = 0,
+ STATIC_BLOCK = 1,
+ FIRST_LOCAL_BLOCK = 2
+};
+
#endif /* #ifndef DEFS_H */