diff options
author | Michael Snyder <msnyder@vmware.com> | 2010-05-17 01:15:20 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2010-05-17 01:15:20 +0000 |
commit | 5d5021647dbce1a933576243b9d54281a88eb3b5 (patch) | |
tree | 9cc50cfe6d9329223b5830db2770152391c17b19 /gdb/ui-out.c | |
parent | 3a6f1766e1c8ec54e2baa00f51d375c554ee63b3 (diff) | |
download | gdb-5d5021647dbce1a933576243b9d54281a88eb3b5.zip gdb-5d5021647dbce1a933576243b9d54281a88eb3b5.tar.gz gdb-5d5021647dbce1a933576243b9d54281a88eb3b5.tar.bz2 |
2010-05-16 Michael Snyder <msnyder@vmware.com>
* target.c: White space.
* target-descriptions.c: White space.
* target-memory.c: White space.
* thread.c: White space.
* top.c: White space.
* tracepoint.c: White space.
* trad-frame.c: White space.
* tramp-frame.c: White space.
* ui-file.c: White space.
* ui-out.c: White space.
* user-regs.c: White space.
* utils.c: White space.
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r-- | gdb/ui-out.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c index ebb312a..4d3bf0c 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -124,6 +124,7 @@ push_level (struct ui_out *uiout, const char *id) { struct ui_out_level *current; + /* We had better not overflow the buffer. */ uiout->level++; gdb_assert (uiout->level >= 0 && uiout->level < MAX_UI_OUT_LEVELS); @@ -371,6 +372,7 @@ ui_out_begin (struct ui_out *uiout, const char *id) { int new_level; + if (uiout->table.flag && !uiout->table.body_flag) internal_error (__FILE__, __LINE__, _("table header or table_body expected; lists must be \ @@ -387,6 +389,7 @@ specified after table_body.")); int fldno; int width; int align; + verify_field (uiout, &fldno, &width, &align); } @@ -406,6 +409,7 @@ ui_out_end (struct ui_out *uiout, enum ui_out_type type) { int old_level = pop_level (uiout, type); + uo_end (uiout, type, old_level); } @@ -419,6 +423,7 @@ static void do_cleanup_end (void *data) { struct ui_out_end_cleanup_data *end_cleanup_data = data; + ui_out_end (end_cleanup_data->uiout, end_cleanup_data->type); xfree (end_cleanup_data); } @@ -428,6 +433,7 @@ make_cleanup_ui_out_end (struct ui_out *uiout, enum ui_out_type type) { struct ui_out_end_cleanup_data *end_cleanup_data; + end_cleanup_data = XMALLOC (struct ui_out_end_cleanup_data); end_cleanup_data->uiout = uiout; end_cleanup_data->type = type; @@ -511,6 +517,7 @@ ui_out_field_stream (struct ui_out *uiout, long length; char *buffer = ui_file_xstrdup (buf->stream, &length); struct cleanup *old_cleanup = make_cleanup (xfree, buffer); + if (length > 0) ui_out_field_string (uiout, fldname, buffer); else @@ -589,9 +596,7 @@ ui_out_message (struct ui_out *uiout, int verbosity, va_list args; va_start (args, format); - uo_message (uiout, verbosity, format, args); - va_end (args); } @@ -651,7 +656,6 @@ ui_out_set_flags (struct ui_out *uiout, int mask) int oldflags = uiout->flags; uiout->flags |= mask; - return oldflags; } @@ -662,7 +666,6 @@ ui_out_clear_flags (struct ui_out *uiout, int mask) int oldflags = uiout->flags; uiout->flags &= ~mask; - return oldflags; } @@ -1145,6 +1148,7 @@ ui_out_new (struct ui_out_impl *impl, void *data, int flags) { struct ui_out *uiout = XMALLOC (struct ui_out); + uiout->data = data; uiout->impl = impl; uiout->flags = flags; |