mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-5083: print warnings
This commit is contained in:
parent
73224da27b
commit
c06fc18cc2
3 changed files with 51 additions and 39 deletions
|
@ -182,13 +182,17 @@ def compute_ghidra_compiler(lang):
|
|||
|
||||
# Check if the selected lang has specific compiler recommendations
|
||||
if not lang in compiler_map:
|
||||
print(f"{lang} not found in compiler map")
|
||||
return 'default'
|
||||
comp_map = compiler_map[lang]
|
||||
if comp_map == data64_compiler_map:
|
||||
print(f"Using the DATA64 compiler map")
|
||||
osabi = get_osabi()
|
||||
if osabi in comp_map:
|
||||
return comp_map[osabi]
|
||||
if None in comp_map:
|
||||
return comp_map[None]
|
||||
print(f"{osabi} not found in compiler map")
|
||||
return 'default'
|
||||
|
||||
|
||||
|
|
|
@ -163,13 +163,17 @@ def compute_ghidra_compiler(lang):
|
|||
|
||||
# Check if the selected lang has specific compiler recommendations
|
||||
if not lang in compiler_map:
|
||||
print(f"{lang} not found in compiler map")
|
||||
return 'default'
|
||||
comp_map = compiler_map[lang]
|
||||
if comp_map == data64_compiler_map:
|
||||
print(f"Using the DATA64 compiler map")
|
||||
osabi = get_osabi()
|
||||
if osabi in comp_map:
|
||||
return comp_map[osabi]
|
||||
if None in comp_map:
|
||||
return comp_map[None]
|
||||
print(f"{osabi} not found in compiler map")
|
||||
return 'default'
|
||||
|
||||
|
||||
|
|
|
@ -225,8 +225,11 @@ def compute_ghidra_compiler(lang):
|
|||
key=lambda l: compiler_map[l]
|
||||
)
|
||||
if len(matched_lang) == 0:
|
||||
print(f"{lang} not found in compiler map")
|
||||
return 'default'
|
||||
comp_map = compiler_map[matched_lang[0]]
|
||||
if comp_map == data64_compiler_map:
|
||||
print(f"Using the DATA64 compiler map")
|
||||
osabi = get_osabi()
|
||||
matched_osabi = sorted(
|
||||
(l for l in comp_map if l in osabi),
|
||||
|
@ -236,6 +239,7 @@ def compute_ghidra_compiler(lang):
|
|||
return comp_map[matched_osabi[0]]
|
||||
if None in comp_map:
|
||||
return comp_map[None]
|
||||
print(f"{osabi} not found in compiler map")
|
||||
return 'default'
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue