aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-12-13 10:00:51 +0000
committerPedro Alves <palves@redhat.com>2012-12-13 10:00:51 +0000
commitc9023fb3ce6a3ad8af9322437cd930cf5779e005 (patch)
treef86d000edd83e5786ec7a24479d5b71651f5e750
parent943d398f4c528b87e85092e6b47b7f87f1b899bc (diff)
downloadgdb-c9023fb3ce6a3ad8af9322437cd930cf5779e005.zip
gdb-c9023fb3ce6a3ad8af9322437cd930cf5779e005.tar.gz
gdb-c9023fb3ce6a3ad8af9322437cd930cf5779e005.tar.bz2
2012-12-13 Pedro Alves <palves@redhat.com>
* gdbarch.sh (do_read): Set IFS to blank.
-rw-r--r--gdb/ChangeLog4
-rwxr-xr-xgdb/gdbarch.sh5
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5ea7d67..272a466 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-13 Pedro Alves <palves@redhat.com>
+
+ * gdbarch.sh (do_read): Set IFS to blank.
+
2012-12-12 Mircea Gherzan <mircea.gherzan@intel.com>
* NEWS: Mention the -catch-load/-catch-unload MI commands.
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 887552e..8a56106 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