-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
4,228 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist | ||
out | ||
node_modules | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Start", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"run-script", | ||
"start" | ||
], | ||
"runtimeExecutable": "npm", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"type": "node" | ||
}, | ||
{ | ||
"name": "Test", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"run-script", | ||
"test" | ||
], | ||
"runtimeExecutable": "npm", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"type": "node" | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 BugSplat | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
Copyright (c) 2006, Google Inc. | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following disclaimer | ||
in the documentation and/or other materials provided with the | ||
distribution. | ||
* Neither the name of Google Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
-------------------------------------------------------------------- | ||
Copyright 2001-2004 Unicode, Inc. | ||
Disclaimer | ||
This source code is provided as is by Unicode, Inc. No claims are | ||
made as to fitness for any particular purpose. No warranties of any | ||
kind are expressed or implied. The recipient agrees to determine | ||
applicability of information provided. If this file has been | ||
purchased on magnetic or optical media from Unicode, Inc., the | ||
sole remedy for any claim will be exchange of defective media | ||
within 90 days of receipt. | ||
Limitations on Rights to Redistribute This Code | ||
Unicode, Inc. hereby grants the right to freely use the information | ||
supplied in this file in the creation of products supporting the | ||
Unicode Standard, and to make copies of this file in any form | ||
for internal or external distribution as long as this notice | ||
remains attached. | ||
-------------------------------------------------------------------- | ||
libunwind - a platform-independent unwind library | ||
Copyright (C) 2008 Google, Inc | ||
Contributed by Paul Pluzhnikov <[email protected]> | ||
Copyright (C) 2010 Konstantin Belousov <[email protected]> | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
-------------------------------------------------------------------- | ||
Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | ||
@APPLE_LICENSE_HEADER_START@ | ||
This file contains Original Code and/or Modifications of Original Code | ||
as defined in and that are subject to the Apple Public Source License | ||
Version 2.0 (the 'License'). You may not use this file except in | ||
compliance with the License. Please obtain a copy of the License at | ||
http:https://www.opensource.apple.com/apsl/ and read it before using this | ||
file. | ||
The Original Code and all software distributed under the License are | ||
distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
Please see the License for the specific language governing rights and | ||
limitations under the License. | ||
@APPLE_LICENSE_HEADER_END@ | ||
-------------------------------------------------------------------- | ||
Copyright (c) 1989, 1993 | ||
The Regents of the University of California. All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
3. All advertising materials mentioning features or use of this software | ||
must display the following acknowledgement: | ||
This product includes software developed by the University of | ||
California, Berkeley and its contributors. | ||
4. Neither the name of the University nor the names of its contributors | ||
may be used to endorse or promote products derived from this software | ||
without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
SUCH DAMAGE. |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#! /usr/bin/env node | ||
import { Platform, minidumpStackwalk } from "../src/minidump-stackwalk"; | ||
import fs from 'fs'; | ||
|
||
const { argv } = process; | ||
const availablePlatforms = Object.keys(Platform).join(', '); | ||
const minidumpFilePath = argv.find(arg => arg.endsWith('.dmp'))!; | ||
const minidumpIndex = argv.indexOf(minidumpFilePath); | ||
const symbolPaths = argv.slice(minidumpIndex + 1, argv.length); | ||
const platformIndex = argv.indexOf('-p') + 1; | ||
const platform = argv.at(platformIndex) as Platform || Platform.bullseye; | ||
const verbose = argv.includes('-v'); | ||
|
||
if (!minidumpFilePath) { | ||
logErrorAndExit(`Please specify a minidump file`); | ||
} | ||
|
||
if (!fs.existsSync(minidumpFilePath)) { | ||
logErrorAndExit(`File doesn't exist at path ${minidumpFilePath}`); | ||
} | ||
|
||
if (!symbolPaths.length) { | ||
logErrorAndExit(`Please specify at least one symbol path`); | ||
} | ||
|
||
if (!validPlatform(platform)) { | ||
logErrorAndExit(`Please specify a platform, valid platforms: ${availablePlatforms}`); | ||
} | ||
|
||
(async () => { | ||
const options = { | ||
machineReadable: argv.includes('-m'), | ||
stackContents: argv.includes('-s'), | ||
dumpingThreadOnly: argv.includes('-c'), | ||
threadBrief: argv.includes('-b'), | ||
}; | ||
const { stdout, stderr } = await minidumpStackwalk(minidumpFilePath, symbolPaths, platform, options); | ||
console.log(stdout); | ||
|
||
if (verbose) { | ||
console.error(stderr); | ||
} | ||
})(); | ||
|
||
function logErrorAndExit(message: string) { | ||
console.error(message); | ||
console.log('Usage: node-minidump-stackwalk <minidump-file-path> <symbol-paths> [-p <platform>] [-m] [-s] [-c] [-b] [-v]'); | ||
process.exit(-1); | ||
} | ||
|
||
function validPlatform(platform: string): platform is Platform { | ||
return Boolean(platform && Object.keys(Platform).includes(platform as Platform)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './src/minidump-stackwalk'; |
Oops, something went wrong.