OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 UnixCppEntriesProvider.call(this, nmExec, targetRootFS); | 663 UnixCppEntriesProvider.call(this, nmExec, targetRootFS); |
664 // Note an empty group. It is required, as UnixCppEntriesProvider expects 3 gr
oups. | 664 // Note an empty group. It is required, as UnixCppEntriesProvider expects 3 gr
oups. |
665 this.FUNC_RE = /^([0-9a-fA-F]{8,16}) ()[iItT] (.*)$/; | 665 this.FUNC_RE = /^([0-9a-fA-F]{8,16}) ()[iItT] (.*)$/; |
666 }; | 666 }; |
667 inherits(MacCppEntriesProvider, UnixCppEntriesProvider); | 667 inherits(MacCppEntriesProvider, UnixCppEntriesProvider); |
668 | 668 |
669 | 669 |
670 MacCppEntriesProvider.prototype.loadSymbols = function(libName) { | 670 MacCppEntriesProvider.prototype.loadSymbols = function(libName) { |
671 this.parsePos = 0; | 671 this.parsePos = 0; |
672 libName = this.targetRootFS + libName; | 672 libName = this.targetRootFS + libName; |
| 673 |
| 674 // It seems that in OS X `nm` thinks that `-f` is a format option, not a |
| 675 // "flat" display option flag. |
673 try { | 676 try { |
674 this.symbols = [os.system(this.nmExec, ['-n', '-f', libName], -1, -1), '']; | 677 this.symbols = [os.system(this.nmExec, ['-n', libName], -1, -1), '']; |
675 } catch (e) { | 678 } catch (e) { |
676 // If the library cannot be found on this system let's not panic. | 679 // If the library cannot be found on this system let's not panic. |
677 this.symbols = ''; | 680 this.symbols = ''; |
678 } | 681 } |
679 }; | 682 }; |
680 | 683 |
681 | 684 |
682 function WindowsCppEntriesProvider(_ignored_nmExec, targetRootFS) { | 685 function WindowsCppEntriesProvider(_ignored_nmExec, targetRootFS) { |
683 this.targetRootFS = targetRootFS; | 686 this.targetRootFS = targetRootFS; |
684 this.symbols = ''; | 687 this.symbols = ''; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 for (var synArg in this.argsDispatch_) { | 884 for (var synArg in this.argsDispatch_) { |
882 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { | 885 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { |
883 synonyms.push(synArg); | 886 synonyms.push(synArg); |
884 delete this.argsDispatch_[synArg]; | 887 delete this.argsDispatch_[synArg]; |
885 } | 888 } |
886 } | 889 } |
887 print(' ' + padRight(synonyms.join(', '), 20) + " " + dispatch[2]); | 890 print(' ' + padRight(synonyms.join(', '), 20) + " " + dispatch[2]); |
888 } | 891 } |
889 quit(2); | 892 quit(2); |
890 }; | 893 }; |
OLD | NEW |