summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2018-05-12 21:30:17 +0200
committerMark Wielaard <mark@klomp.org>2018-05-12 21:30:17 +0200
commit9dd183f3d036221758b5a53a8918fd7c568282cb (patch)
treed2cc46454661fea426988537dfc451744ed11c7c /src
parent3da2d6af0d56d23a746f540d3c1f8f09e75c6b95 (diff)
downloadelfutils-9dd183f3d036221758b5a53a8918fd7c568282cb.tar.gz
addr2line: Add explicit fflush for stdout when reading from stdin.
To make it possible to use eu-addr2line interactively through a pipe we need to explicitly flush stdout after handling each line from stdin. https://sourceware.org/bugzilla/show_bug.cgi?id=23173 Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/addr2line.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0a8b86c8..24504077 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-12 Mark Wielaard <mark@klomp.org>
+
+ * addr2line.c (main): Add fflush (stdout) after handle_address ()
+ when reading from stdin.
+
2018-04-24 Mark Wielaard <mark@klomp.org>
* readelf.c (print_debug_aranges_section): Try elf_rawdata if no
diff --git a/src/addr2line.c b/src/addr2line.c
index 444ee52c..5acafa00 100644
--- a/src/addr2line.c
+++ b/src/addr2line.c
@@ -187,6 +187,7 @@ main (int argc, char *argv[])
buf[chars - 1] = '\0';
result = handle_address (buf, dwfl);
+ fflush (stdout);
}
free (buf);