mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Make parse_drmingw.sh
script also useable on Windows with MSYS2
Use `objdump` instead of `winedump` to determine the image base address of the executable file, as `winedump` is not easily available on Windows. It should be enough to install the `binutils` package (containing `addr2line` and `objdump`) from a package manager to use the script now.
This commit is contained in:
parent
172bc33137
commit
00bf9b5248
|
@ -30,7 +30,7 @@ if [ "$TMP_OFFSET" != "0" ]; then
|
|||
echo "Module offset: 0x$TMP_OFFSET"
|
||||
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"
|
||||
|
||||
ADDR_PC_REGEX='[0-9A-Fa-f]+ [0-9A-Fa-f]+ [0-9A-Fa-f]+ [0-9A-Fa-f]+'
|
||||
|
|
Loading…
Reference in a new issue