Last active
June 7, 2024 06:47
-
-
Save chen3feng/ac113d6de54c89ed6f3fa27a475d533e to your computer and use it in GitHub Desktop.
GDB Disassembled code filter
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
#!/bin/bash | |
sed -E -e "s/^(=>)?\s+0x[a-z0-9]+\s+//g" -e "s/(<\+[0-9]+>:\s+)(\w+\s+)0x[0-9a-f]+ </\1\2</g" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remove absolute address from gdb disassembly code.
Convert code from like this
to like this
So you can easily compare generated code from different binary files.