Fix GetMainModule() to properly get first module

Change MinidumpModuleList::GetMainModule() to use GetModuleAtIndex() instead
of GetModuleAtSequence() because the former gets the first module that was
in the minidump file, while the latter actually gets the first module when
sorted by address.  While this is pretty much the same thing at the moment,
I have another change in the works that can sometimes affect the module
order in the file.

BUG=chromium-os:25355
TEST=Ran Breakpad tests
Review URL: https://breakpad.appspot.com/366001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@941 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mkrebs@chromium.org 2012-03-30 21:59:16 +00:00
parent 1d8752bf0f
commit 70f5af9444

View file

@ -2483,7 +2483,7 @@ const MinidumpModule* MinidumpModuleList::GetMainModule() const {
// The main code module is the first one present in a minidump file's // The main code module is the first one present in a minidump file's
// MDRawModuleList. // MDRawModuleList.
return GetModuleAtSequence(0); return GetModuleAtIndex(0);
} }