aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/filestuff.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-02-15 12:12:25 -0700
committerTom Tromey <tromey@adacore.com>2024-02-27 09:46:31 -0700
commit5c92d8456d3120bcfbbd0ad063d423411a8c685d (patch)
tree5ac3dbb787ab4c1a194627f052518acb0e088f9c /gdbsupport/filestuff.h
parent50c6682d74bb1b46ae3e140e107549733c699a44 (diff)
downloadgdb-5c92d8456d3120bcfbbd0ad063d423411a8c685d.zip
gdb-5c92d8456d3120bcfbbd0ad063d423411a8c685d.tar.gz
gdb-5c92d8456d3120bcfbbd0ad063d423411a8c685d.tar.bz2
Introduce read_remainder_of_file
This patch adds a new function, read_remainder_of_file. This is like read_text_file_to_string, but reads from an existing 'FILE *'. This will be used in a subsequent patch. Reviewed-By: Tom de Vries <tdevries@suse.de>
Diffstat (limited to 'gdbsupport/filestuff.h')
-rw-r--r--gdbsupport/filestuff.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdbsupport/filestuff.h b/gdbsupport/filestuff.h
index 1c43b7d..e2ee141 100644
--- a/gdbsupport/filestuff.h
+++ b/gdbsupport/filestuff.h
@@ -133,4 +133,8 @@ extern bool mkdir_recursive (const char *dir);
extern std::optional<std::string> read_text_file_to_string (const char *path);
+/* Read the remaining content from FILE into an std::string. */
+
+extern std::string read_remainder_of_file (FILE *file);
+
#endif /* COMMON_FILESTUFF_H */