return m_argv + count ();
}
- bool operator!= (nullptr_t)
+ bool operator!= (std::nullptr_t)
{
return m_argv != NULL;
}
- bool operator== (nullptr_t)
+ bool operator== (std::nullptr_t)
{
return m_argv == NULL;
}
\f
/* Cleanup utilities. */
-struct ui_out;
-extern struct cleanup *
- make_cleanup_ui_out_redirect_pop (struct ui_out *uiout);
-
struct section_addr_info;
-extern struct cleanup *(make_cleanup_free_section_addr_info
- (struct section_addr_info *));
+extern struct cleanup *make_cleanup_free_section_addr_info
+ (struct section_addr_info *);
/* For make_cleanup_close see common/filestuff.h. */
-extern struct cleanup *make_cleanup_restore_integer (int *variable);
-extern struct cleanup *make_cleanup_restore_uinteger (unsigned int *variable);
-
struct target_ops;
extern struct cleanup *make_cleanup_unpush_target (struct target_ops *ops);
extern struct cleanup *make_cleanup_value_free_to_mark (struct value *);
-extern struct cleanup *make_cleanup_value_free (struct value *);
/* A deleter for a hash table. */
struct htab_deleter
/* A unique_ptr wrapper for htab_t. */
typedef std::unique_ptr<htab, htab_deleter> htab_up;
-struct parser_state;
-extern struct cleanup *make_cleanup_clear_parser_state
- (struct parser_state **p);
-
extern void free_current_contents (void *);
extern void init_page_info (void);
-extern struct cleanup *make_cleanup_restore_page_info (void);
-extern struct cleanup *
- set_batch_flag_and_make_cleanup_restore_page_info (void);
+/* Temporarily set BATCH_FLAG and the associated unlimited terminal size.
+ Restore when destroyed. */
+
+struct set_batch_flag_and_restore_page_info
+{
+public:
+
+ set_batch_flag_and_restore_page_info ();
+ ~set_batch_flag_and_restore_page_info ();
+
+ DISABLE_COPY_AND_ASSIGN (set_batch_flag_and_restore_page_info);
+
+private:
+
+ /* Note that this doesn't use scoped_restore, because it's important
+ to control the ordering of operations in the destruction, and it
+ was simpler to avoid introducing a new ad hoc class. */
+ unsigned m_save_lines_per_page;
+ unsigned m_save_chars_per_line;
+ int m_save_batch_flag;
+};
extern struct cleanup *make_bpstat_clear_actions_cleanup (void);
\f
/* Path utilities. */
-extern char *gdb_realpath (const char *);
+extern gdb::unique_xmalloc_ptr<char> gdb_realpath (const char *);
-extern char *gdb_realpath_keepfile (const char *);
+extern gdb::unique_xmalloc_ptr<char> gdb_realpath_keepfile (const char *);
-extern char *gdb_abspath (const char *);
+extern gdb::unique_xmalloc_ptr<char> gdb_abspath (const char *);
extern int gdb_filename_fnmatch (const char *pattern, const char *string,
int flags);
extern pid_t wait_to_die_with_timeout (pid_t pid, int *status, int timeout);
#endif
-extern int producer_is_gcc_ge_4 (const char *producer);
-extern int producer_is_gcc (const char *producer, int *major, int *minor);
-
extern int myread (int, char *, int);
/* Ensure that V is aligned to an N byte boundary (B's assumed to be a