Linux dumper: Correctly find boundary address when computing line and function sizes.
In NextAddress, check both the file list and the function list for the nearest boundary. Don't assume that, if we find any bounding entry in the function list, that must be the nearest thing. A=jimblandy R=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@365 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
1147cc4920
commit
0eb3c6e5e2
1 changed files with 10 additions and 6 deletions
|
@ -347,9 +347,6 @@ static ElfW(Addr) NextAddress(
|
|||
),
|
||||
&func_info)
|
||||
);
|
||||
if (next_func_iter != sorted_functions->end())
|
||||
return (*next_func_iter)->addr;
|
||||
|
||||
std::vector<struct SourceFileInfo *>::iterator next_file_iter =
|
||||
std::find_if(sorted_files->begin(),
|
||||
sorted_files->end(),
|
||||
|
@ -360,11 +357,18 @@ static ElfW(Addr) NextAddress(
|
|||
),
|
||||
&func_info)
|
||||
);
|
||||
if (next_file_iter != sorted_files->end()) {
|
||||
if (next_func_iter != sorted_functions->end()) {
|
||||
if (next_file_iter != sorted_files->end())
|
||||
return std::min((*next_file_iter)->addr, (*next_func_iter)->addr);
|
||||
else
|
||||
return (*next_func_iter)->addr;
|
||||
} else {
|
||||
if (next_file_iter != sorted_files->end())
|
||||
return (*next_file_iter)->addr;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Add included file information.
|
||||
// Also fix the source id for the line info.
|
||||
|
|
Loading…
Reference in a new issue