Fix CalculateStackSize to behave properly when the main thread's stack is
split up into multiple regions.

An older workaround relyied on known fixed stack locations and only filled in
the initial page of the stack if it was in a distinct region. The new approach
looks upwards for additional regions that appear to be part of the same stack.

With PIE on Lion, the stack no longer begins at a fixed address, so the older
workaround became ineffective.

BUG=247, chromium:94107
TEST=Stacks should run through to _main/start and then stop when examining
     Chrome on Lion with PIE and "slid" stacks.
Review URL: http://breakpad.appspot.com/300001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@826 4c0a9323-5329-0410-9bdc-e9ce6186880e
2 files changed