Created
June 3, 2020 18:36
-
-
Save routevegetable/7479fea530a89f1ecdefe75752c93509 to your computer and use it in GitHub Desktop.
Extract source file list from GDB
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
source_list = open("$SOURCE_LIST_FILE", "w") | |
lines = gdb.execute('info sources', to_string=True).split('\n') | |
for line in lines: | |
line = line.strip() | |
if not line.startswith('/'): | |
continue | |
parts = line.split(',') | |
for part in parts: | |
source_list.write(part.strip() + '\n') | |
source_list.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment