diff --git a/checkin_notes b/checkin_notes index 30b38dcdf6..b635d256fc 100755 --- a/checkin_notes +++ b/checkin_notes @@ -11936,3 +11936,10 @@ Charlie 20 Sept 2005 lib/ mac_backtrace.C + +Charlie 21 Sept 2005 + - Mac: Don't show stack frames of signal handler and of backtrace + in backtrace. + + lib/ + mac_backtrace.C diff --git a/lib/mac_backtrace.C b/lib/mac_backtrace.C index cfc159fc8a..f1fa81fdc4 100644 --- a/lib/mac_backtrace.C +++ b/lib/mac_backtrace.C @@ -68,6 +68,8 @@ enum { kFrameCount = 200 }; +#define SKIPFRAME 4 /* Number frames overhead for signal handler and backtrace */ + static void PrintNameOfThisApp(void); static void PrintOSVersion(char *minorVersion); static int OutputFrames(const MacBTPPCFrame *frameArray, unsigned long frameCount, unsigned char lookupSymbolNames); @@ -384,10 +386,10 @@ static int OutputFrames(const MacBTPPCFrame *frameArray, unsigned long frameCoun fputs("Stack Frame backtrace:\n # Flags Frame Addr Caller PC Symbol\n" "=== === ========== ========== ==========\n", stderr); - for (frameIndex = 0; frameIndex < frameCount; frameIndex++) { + for (frameIndex = SKIPFRAME; frameIndex < frameCount; frameIndex++) { fprintf(stderr, "%3ld %c%c%c 0x%08lx 0x%08lx ", - frameIndex, + frameIndex - (SKIPFRAME - 1), (frameArray[frameIndex].flags & kMacBTFrameBadMask) ? 'F' : '-', (frameArray[frameIndex].flags & kMacBTPCBadMask) ? 'P' : '-', (frameArray[frameIndex].flags & kMacBTSignalHandlerMask) ? 'S' : '-',