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=5b661956ace4b384f64670c065d283bc7ef7ca4e;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);