Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: tools/traceline/traceline/sym_resolver.h

Issue 118377: Some improvements and bug fixes to traceline. (Closed)
Patch Set: for in file Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/traceline/traceline/scripts/split.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/traceline/traceline/sym_resolver.h
diff --git a/tools/traceline/traceline/sym_resolver.h b/tools/traceline/traceline/sym_resolver.h
index c3d93c2da4aba701f1db74ef6aae686c8cb18765..eb7e06c08afcee18ab1f70a0513ba922b3999265 100644
--- a/tools/traceline/traceline/sym_resolver.h
+++ b/tools/traceline/traceline/sym_resolver.h
@@ -61,7 +61,11 @@ class SymResolver {
// The name returned from SymEnumerateModules64 doesn't include the ext,
// so we can't differentiate between a dll and exe of the same name. So
// collect all of the base addresses and query for more info.
- if (SymEnumerateModules64(proc_, &SymEnumer, &bases) != TRUE) {
+ // The prototype changed from PSTR to PCSTR, so in order to support older
+ // SDKs we have to cast SymEnumer.
+ PSYM_ENUMMODULES_CALLBACK64 enumer =
+ reinterpret_cast<PSYM_ENUMMODULES_CALLBACK64>(&SymEnumer);
+ if (SymEnumerateModules64(proc_, enumer, &bases) != TRUE) {
NOTREACHED("SymEnumerateModules64 failed: %d\n", GetLastError());
}
for (size_t i = 0; i < bases.size(); ++i) {
« no previous file with comments | « tools/traceline/traceline/scripts/split.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698