From: Ben Pfaff Date: Tue, 20 Dec 2005 21:11:42 +0000 (+0000) Subject: Make backtrace chop long filenames to just the last few characters. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a23883fa27df87a30c6392d0d36f5de2252c2cb;p=pintos-anon Make backtrace chop long filenames to just the last few characters. --- diff --git a/src/utils/backtrace b/src/utils/backtrace index baa5eff..6cfd3ec 100755 --- a/src/utils/backtrace +++ b/src/utils/backtrace @@ -60,6 +60,7 @@ while () { my ($function, $line); chomp ($function = $_); chomp ($line = ); + $line = "..." . substr ($line, -25) if length ($line) > 28; print shift (@ARGV), ": $function ($line)\n"; } close (A2L);