From 32a4ebc59f20fbdaa909345ab41bc5e07a432c1b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 14 May 2014 14:15:48 -0500 Subject: Add removal of CR from output of tsim. --- sim-scripts/gdb-sim-run.in | 12 +++++++----- sim-scripts/tsim-support | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sim-scripts/gdb-sim-run.in b/sim-scripts/gdb-sim-run.in index 252bd19..16c79b6 100755 --- a/sim-scripts/gdb-sim-run.in +++ b/sim-scripts/gdb-sim-run.in @@ -274,15 +274,17 @@ checkGenericExits() catLog() { logfile=${1} - if [ ${doCatOutput} = "no" ] ; then - return - fi if [ ${bspNeedsDos2Unix} = "yes" ] ; then - dos2unix ${logfile} + sed --in-place -e 's/\r//g' ${logfile} + # alternative way to do the above + # tr -d "\015" <${logfile} fi - tr -d "\015" <${logfile} + if [ ${doCatOutput} = "no" ] ; then + return + fi + cat ${logfile} echo } diff --git a/sim-scripts/tsim-support b/sim-scripts/tsim-support index ae4acb8..cabbee9 100644 --- a/sim-scripts/tsim-support +++ b/sim-scripts/tsim-support @@ -8,6 +8,7 @@ bspUsesGDBSimulator="no" bspGeneratesGDBCommands="yes" bspSupportsGDBServerMode="yes" bspNeedsSttySane="no" +bspNeedsDos2Unix="yes" type ${runBSP} >/dev/null 2>&1 if [ $? -ne 0 ] ; then -- cgit v1.2.3