diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-06-14 23:43:00 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-06-15 21:39:06 +0100 |
commit | ec8e2b6d3051f0b4b2a8eee9917898e95046c62f (patch) | |
tree | 6954251f1ea7259a107f40632c8147beb231d3c7 /gdb/annotate.c | |
parent | 0d3abd8cc936360f8c46502135edd2e646473438 (diff) | |
download | fsf-binutils-gdb-ec8e2b6d3051f0b4b2a8eee9917898e95046c62f.zip fsf-binutils-gdb-ec8e2b6d3051f0b4b2a8eee9917898e95046c62f.tar.gz fsf-binutils-gdb-ec8e2b6d3051f0b4b2a8eee9917898e95046c62f.tar.bz2 |
gdb: Don't allow annotations to influence what else GDB prints
The annotations should be additional information printed by GDB to be
consumed by users (GUIs), but GDB shouldn't reduce what it prints
based on whether annotations are on or not. However, this is what
happens for annotate_source_line.
This commit makes annotate_source_line a void function that simply
outputs the annotation information, GDB will then print the contents
of the source line to the terminal in the normal way.
Some tests needed to be updated after this commit.
gdb/ChangeLog:
* annotate.c (annotate_source_line): Change return type to void,
update implementation to match.
* annotate.h (annotate_source_line): Change return type to void,
update header comment.
* stack.c (print_frame_info): Don't change what frame information
is printed based on whether annotations are on or not.
gdb/testsuite/ChangeLog:
* gdb.base/annota1.exp: Update expected results.
* gdb.cp/annota2.exp: Likewise.
* gdb.cp/annota3.exp: Likewise.
Diffstat (limited to 'gdb/annotate.c')
-rw-r--r-- | gdb/annotate.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/annotate.c b/gdb/annotate.c index 84f8129..8d8a019 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -434,7 +434,7 @@ annotate_source (const char *filename, int line, int character, int mid, /* See annotate.h. */ -bool +void annotate_source_line (struct symtab *s, int line, int mid_statement, CORE_ADDR pc) { @@ -443,17 +443,15 @@ annotate_source_line (struct symtab *s, int line, int mid_statement, if (s->line_charpos == nullptr) open_source_file_with_line_charpos (s); if (s->fullname == nullptr) - return false; + return; /* Don't index off the end of the line_charpos array. */ if (line > s->nlines) - return false; + return; annotate_source (s->fullname, line, s->line_charpos[line - 1], mid_statement, get_objfile_arch (SYMTAB_OBJFILE (s)), pc); - return true; } - return false; } |