aboutsummaryrefslogtreecommitdiff
path: root/src/processor/stackwalker_x86.cc
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-05-08 20:56:30 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-05-08 20:56:30 +0000
commit436801fa2324dfae9e5a0bd2651dd7c753e7e95f (patch)
tree6ecceba910a73a2f69d1faceb5649e48335f79ad /src/processor/stackwalker_x86.cc
parent0e668e07832033410dc72e6940bc53175a12a5f1 (diff)
downloadgoogle-breakpad-436801fa2324dfae9e5a0bd2651dd7c753e7e95f.tar.gz
Stacks (still) truncated on win32 (#165). Patch by Benjamin Smedberg. r=me
Don't require a program string to reset %ebp, as not all program strings set this value. http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/ee4854ae7ffce94e git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@163 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/stackwalker_x86.cc')
-rw-r--r--src/processor/stackwalker_x86.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/processor/stackwalker_x86.cc b/src/processor/stackwalker_x86.cc
index cb8be3ed..59662cdf 100644
--- a/src/processor/stackwalker_x86.cc
+++ b/src/processor/stackwalker_x86.cc
@@ -223,9 +223,7 @@ StackFrame* StackwalkerX86::GetCallerFrame(
"$esp .raSearchStart 4 + =";
} else {
// The function corresponding to the last frame doesn't use %ebp at
- // all. The callee frame is located relative to %esp. %ebp is reset
- // to itself only to cause it to appear to have been set in
- // dictionary_validity.
+ // all. The callee frame is located relative to %esp.
//
// The called procedure's instruction pointer and stack pointer are
// recovered in the same way as the case above, except that no
@@ -244,8 +242,7 @@ StackFrame* StackwalkerX86::GetCallerFrame(
// %esp_new = %esp_old + callee_params + saved_regs + locals + 4
// %ebp_new = %ebp_old
program_string = "$eip .raSearchStart ^ = "
- "$esp .raSearchStart 4 + = "
- "$ebp $ebp =";
+ "$esp .raSearchStart 4 + =";
recover_ebp = false;
}
} else {
@@ -280,15 +277,14 @@ StackFrame* StackwalkerX86::GetCallerFrame(
"$ebp $ebp ^ =";
}
- // Now crank it out, making sure that the program string set the three
- // required variables.
+ // Now crank it out, making sure that the program string set at least the
+ // two required variables.
PostfixEvaluator<u_int32_t> evaluator =
PostfixEvaluator<u_int32_t>(&dictionary, memory_);
PostfixEvaluator<u_int32_t>::DictionaryValidityType dictionary_validity;
if (!evaluator.Evaluate(program_string, &dictionary_validity) ||
dictionary_validity.find("$eip") == dictionary_validity.end() ||
- dictionary_validity.find("$esp") == dictionary_validity.end() ||
- dictionary_validity.find("$ebp") == dictionary_validity.end()) {
+ dictionary_validity.find("$esp") == dictionary_validity.end()) {
return NULL;
}