Merge pull request #8163 from Robyt3/Scripts-DrMingw-Windows

Make `parse_drmingw.sh` script also useable on Windows with MSYS2
This commit is contained in:
Dennis Felsing 2024-03-29 11:28:09 +00:00 committed by GitHub
commit 3eda861c37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,7 @@ if [ "$TMP_OFFSET" != "0" ]; then
echo "Module offset: 0x$TMP_OFFSET" echo "Module offset: 0x$TMP_OFFSET"
fi fi
ADDR_BASE=$(winedump -f "$1" | grep -E -o "image base[ ]*0x[0-9A-Fa-f]*" | grep -E -o "0x[0-9A-Fa-f]+" | tail -1) ADDR_BASE=0x$(objdump -x "$1" | grep -E -o "^ImageBase\s+[0-9A-Fa-f]+$" | grep -E -o "[0-9A-Fa-f]+$")
echo "Image base: $ADDR_BASE" echo "Image base: $ADDR_BASE"
ADDR_PC_REGEX='[0-9A-Fa-f]+ [0-9A-Fa-f]+ [0-9A-Fa-f]+ [0-9A-Fa-f]+' ADDR_PC_REGEX='[0-9A-Fa-f]+ [0-9A-Fa-f]+ [0-9A-Fa-f]+ [0-9A-Fa-f]+'