Skip to content

Commit

Permalink
fix: 入参包含空格时,将导致文件后缀识别错误的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
GiraKoo committed May 16, 2024
1 parent 8c9d8a3 commit 3a5d441
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
a. dump-helper将优先解析so文件,生成sym文件。
b. dump-helper将解析dmp文件,生成.stack和.raw文件。

## V2.3 特性
## 特性

- 合并dump_syms和minidump_stackwalk,可根据文件后缀识别该如何处理文件。

Expand All @@ -28,4 +28,4 @@ Version 0.21.1 (2024-03-01)
### mozilla/dump_syms

Git: https://github.com/mozilla/dump_syms.git
Version 2.3.1
Version 2.3.1
4 changes: 4 additions & 0 deletions dump-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,16 @@ def stack_walk(dump_path):

# Parse libraries
for so_path in args:
# Fix param that endsWith space
so_path = so_path.strip()
if so_path.endswith(".so") or so_path.endswith(".dll") or so_path.endswith(".lib"):
colorful_print("info", f"Processing library {so_path}...")
dump_syms(so_path)

# Parse dump files
for dump_path in args:
# Fix param that endsWith space
dump_path = dump_path.strip()
if dump_path.endswith(".dmp") or dump_path.endswith(".minidump"):
colorful_print("info", f"Processing dump file {dump_path}...")
stack_walk(dump_path)
Expand Down

0 comments on commit 3a5d441

Please sign in to comment.