Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis bnoordhuis/patsje.patch Secret
Created Mar 15, 2013

Embed
What would you like to do?
v8 linux-tick-processor: look for dbg symbols in /usr/lib/debug
diff --git a/deps/v8/tools/tickprocessor.js b/deps/v8/tools/tickprocessor.js
index 4c4886d..3c531f9 100644
--- a/deps/v8/tools/tickprocessor.js
+++ b/deps/v8/tools/tickprocessor.js
@@ -620,16 +620,33 @@ inherits(UnixCppEntriesProvider, CppEntriesProvider);
UnixCppEntriesProvider.prototype.loadSymbols = function(libName) {
this.parsePos = 0;
- libName = this.targetRootFS + libName;
+
+ var lib = this.targetRootFS + libName;
try {
this.symbols = [
- os.system(this.nmExec, ['-C', '-n', '-S', libName], -1, -1),
- os.system(this.nmExec, ['-C', '-n', '-S', '-D', libName], -1, -1)
+ os.system(this.nmExec, ['-C', '-n', '-S', lib], -1, -1),
+ os.system(this.nmExec, ['-C', '-n', '-S', '-D', lib], -1, -1)
];
+ return;
} catch (e) {
- // If the library cannot be found on this system let's not panic.
- this.symbols = ['', ''];
+ // Ignore.
+ }
+
+ // Look for the dbg version of the library.
+ lib = this.targetRootFS + '/usr/lib/debug/' + libName;
+ try {
+ this.symbols = [
+ os.system(this.nmExec, ['-C', '-n', '-S', lib], -1, -1),
+ os.system(this.nmExec, ['-C', '-n', '-S', '-D', lib], -1, -1)
+ ];
+ return;
+ }
+ catch (e) {
+ // Ignore.
}
+
+ // If the library cannot be found on this system let's not panic.
+ this.symbols = ['', ''];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.