X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=gdb%2Ftop.c;h=a34635b8b508aaa0e8c635bf54eddb0797b91143;hb=79aa2fe86f105fae162f780f760d655f212eaeb6;hp=cae90d659784ab3d525e6fb59e35efec045c5cc1;hpb=a74e1786ac24d4ef1ce8a92a1ab06c727a462881;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/top.c b/gdb/top.c index cae90d6597..a34635b8b5 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -86,6 +86,21 @@ extern void initialize_all_files (void); #define DEFAULT_PROMPT "(gdb) " #endif +/* Generate a function that exports a pointer to a field of the + current UI. */ + +#define gen_ret_current_ui_field_ptr(type, name) \ +type * \ +current_ui_## name ## _ptr (void) \ +{ \ + return ¤t_ui->m_ ## name; \ +} + +gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdout) +gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdin) +gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stderr) +gen_ret_current_ui_field_ptr (struct ui_file *, gdb_stdlog) + /* Initialization file name for gdb. This is host-dependent. */ const char gdbinit[] = GDBINIT;