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

Side by Side Diff: src/checks.cc

Issue 83573003: Best effort for C stack traces with unrecognised symbol format Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 for (int i = 1; i < size; ++i) { 52 for (int i = 1; i < size; ++i) {
53 i::OS::PrintError("%2d: ", i); 53 i::OS::PrintError("%2d: ", i);
54 char mangled[201]; 54 char mangled[201];
55 if (sscanf(symbols[i], "%*[^(]%*[(]%200[^)+]", mangled) == 1) { // NOLINT 55 if (sscanf(symbols[i], "%*[^(]%*[(]%200[^)+]", mangled) == 1) { // NOLINT
56 int status; 56 int status;
57 size_t length; 57 size_t length;
58 char* demangled = abi::__cxa_demangle(mangled, NULL, &length, &status); 58 char* demangled = abi::__cxa_demangle(mangled, NULL, &length, &status);
59 i::OS::PrintError("%s\n", demangled != NULL ? demangled : mangled); 59 i::OS::PrintError("%s\n", demangled != NULL ? demangled : mangled);
60 free(demangled); 60 free(demangled);
61 } else { 61 } else {
62 i::OS::PrintError("??\n"); 62 i::OS::PrintError("%s\n", symbols[i]);
63 } 63 }
64 } 64 }
65 } 65 }
66 free(symbols); 66 free(symbols);
67 #endif // V8_LIBC_GLIBC || V8_OS_BSD 67 #endif // V8_LIBC_GLIBC || V8_OS_BSD
68 } 68 }
69 69
70 70
71 // Contains protection against recursive calls (faults while handling faults). 71 // Contains protection against recursive calls (faults while handling faults).
72 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) { 72 extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 i::OS::PrintError("\n#\n\n"); 125 i::OS::PrintError("\n#\n\n");
126 i::OS::Abort(); 126 i::OS::Abort();
127 } 127 }
128 128
129 129
130 namespace v8 { namespace internal { 130 namespace v8 { namespace internal {
131 131
132 intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; } 132 intptr_t HeapObjectTagMask() { return kHeapObjectTagMask; }
133 133
134 } } // namespace v8::internal 134 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698