summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-21 14:17:32 -0700
committerTom Tromey <tom@tromey.com>2019-01-22 20:35:59 -0700
commit38561778f3c6a6af98355925bcfd5d3c1e39a484 (patch)
treea7c4717df2d8cc49aa2b87e7c17e6382a2ed7a37
parent37b3ab5b547de7e727c5426c6615ece0284168c7 (diff)
downloadbinutils-gdb-38561778f3c6a6af98355925bcfd5d3c1e39a484.tar.gz
Rename "lines" parameter in source-cache.h
A compile in the TUI somehow had "lines" defined as a macro. This caused a compile error when including source-cache.h after whatever header did that. I tracked this down to a #define in /usr/include/term.h, so I just changed source-cache.h to avoid the clash. gdb/ChangeLog 2019-01-22 Tom Tromey <tom@tromey.com> * source-cache.h (class source_cache) <get_source_lines, get_plain_source_lines, extract_lines>: Rename "lines" parameter.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/source-cache.h10
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 44ec0a6c036..d9d6d403f55 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2019-01-22 Tom Tromey <tom@tromey.com>
+ * source-cache.h (class source_cache) <get_source_lines,
+ get_plain_source_lines, extract_lines>: Rename "lines" parameter.
+
+2019-01-22 Tom Tromey <tom@tromey.com>
+
* remote-fileio.h (struct remote_target): Declare.
2019-01-22 Tom Tromey <tom@tromey.com>
diff --git a/gdb/source-cache.h b/gdb/source-cache.h
index b6656e035ee..dd23266e253 100644
--- a/gdb/source-cache.h
+++ b/gdb/source-cache.h
@@ -36,10 +36,10 @@ public:
/* Get the source text for the source file in symtab S. FIRST_LINE
and LAST_LINE are the first and last lines to return; line
numbers are 1-based. If the file cannot be read, false is
- returned. Otherwise, LINES is set to the desired text. The
+ returned. Otherwise, LINES_OUT is set to the desired text. The
returned text may include ANSI terminal escapes. */
bool get_source_lines (struct symtab *s, int first_line,
- int last_line, std::string *lines);
+ int last_line, std::string *lines_out);
/* Remove all the items from the source cache. */
void clear ()
@@ -62,12 +62,12 @@ private:
source lines are not highlighted. The arguments and return value
are as for get_source_lines. */
bool get_plain_source_lines (struct symtab *s, int first_line,
- int last_line, std::string *lines);
+ int last_line, std::string *lines_out);
/* A helper function for get_plain_source_lines that extracts the
- desired source lines from TEXT, putting them into LINES. The
+ desired source lines from TEXT, putting them into LINES_OUT. The
arguments and return value are as for get_source_lines. */
bool extract_lines (const struct source_text &text, int first_line,
- int last_line, std::string *lines);
+ int last_line, std::string *lines_out);
/* The contents of the cache. */
std::vector<source_text> m_source_map;