Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created March 15, 2013 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/5efa131ca3bbf9b3388a to your computer and use it in GitHub Desktop.
Save bnoordhuis/5efa131ca3bbf9b3388a to your computer and use it in GitHub Desktop.
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