From: Pedro Alves Date: Thu, 13 Dec 2012 10:00:51 +0000 (+0000) Subject: 2012-12-13 Pedro Alves X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9023fb3ce6a3ad8af9322437cd930cf5779e005;p=binutils-gdb.git 2012-12-13 Pedro Alves * gdbarch.sh (do_read): Set IFS to blank. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5ea7d67d21e..272a4669218 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2012-12-13 Pedro Alves + + * gdbarch.sh (do_read): Set IFS to blank. + 2012-12-12 Mircea Gherzan * NEWS: Mention the -catch-load/-catch-unload MI commands. diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 887552eda99..8a56106e474 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -47,7 +47,10 @@ do_read () { comment="" class="" - while read line + # On some SH's, 'read' trims leading and trailing whitespace by + # default (e.g., bash), while on others (e.g., dash), it doesn't. + # Set IFS to empty to disable the trimming everywhere. + while IFS='' read line do if test "${line}" = "" then