aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.h
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-01-26 14:29:19 +0000
committerYao Qi <yao.qi@linaro.org>2017-01-26 14:29:19 +0000
commit80d758749a7a679288e6e72b2e849b814413b719 (patch)
tree016ba1a6b78e1496d0983dad8ae9a8b9042edfee /gdb/utils.h
parent8e87a59348adb7e4c31c8f4faf86df8b17ffb54a (diff)
New function null_stream
This patch adds a new function null_stream, which returns a null stream. The null stream can be used in multiple places. It is used in gdb_insn_length, and the following patches will use it too. gdb: 2017-01-26 Yao Qi <yao.qi@linaro.org> * disasm.c (do_ui_file_delete): Delete. (gdb_insn_length): Move code creating stream to ... * utils.c (null_stream): ... here. New function. * utils.h (null_stream): Declare.
Diffstat (limited to 'gdb/utils.h')
-rw-r--r--gdb/utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/utils.h b/gdb/utils.h
index c548a50082..9e71cc2792 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -189,6 +189,9 @@ extern struct ui_file *gdb_stdtarg;
extern struct ui_file *gdb_stdtargerr;
extern struct ui_file *gdb_stdtargin;
+/* Return a null stream. */
+extern struct ui_file *null_stream (void);
+
/* Set the screen dimensions to WIDTH and HEIGHT. */
extern void set_screen_width_and_height (int width, int height);