Merge remote-tracking branch 'origin/GP-5083_d-millar_warn_def_lang'

This commit is contained in:
Ryan Kurtz 2024-11-04 07:53:41 -05:00
commit c702d7c66d
3 changed files with 25 additions and 13 deletions

View File

@ -182,13 +182,17 @@ def compute_ghidra_compiler(lang):
# Check if the selected lang has specific compiler recommendations # Check if the selected lang has specific compiler recommendations
if not lang in compiler_map: if not lang in compiler_map:
print(f"{lang} not found in compiler map")
return 'default' return 'default'
comp_map = compiler_map[lang] comp_map = compiler_map[lang]
if comp_map == data64_compiler_map:
print(f"Using the DATA64 compiler map")
osabi = get_osabi() osabi = get_osabi()
if osabi in comp_map: if osabi in comp_map:
return comp_map[osabi] return comp_map[osabi]
if None in comp_map: if None in comp_map:
return comp_map[None] return comp_map[None]
print(f"{osabi} not found in compiler map")
return 'default' return 'default'

View File

@ -164,13 +164,17 @@ def compute_ghidra_compiler(lang):
# Check if the selected lang has specific compiler recommendations # Check if the selected lang has specific compiler recommendations
if not lang in compiler_map: if not lang in compiler_map:
print(f"{lang} not found in compiler map")
return 'default' return 'default'
comp_map = compiler_map[lang] comp_map = compiler_map[lang]
if comp_map == data64_compiler_map:
print(f"Using the DATA64 compiler map")
osabi = get_osabi() osabi = get_osabi()
if osabi in comp_map: if osabi in comp_map:
return comp_map[osabi] return comp_map[osabi]
if None in comp_map: if None in comp_map:
return comp_map[None] return comp_map[None]
print(f"{osabi} not found in compiler map")
return 'default' return 'default'

View File

@ -225,14 +225,18 @@ def compute_ghidra_compiler(lang):
key=lambda l: compiler_map[l] key=lambda l: compiler_map[l]
) )
if len(matched_lang) == 0: if len(matched_lang) == 0:
print(f"{lang} not found in compiler map")
return 'default' return 'default'
comp_map = compiler_map[matched_lang[0]] comp_map = compiler_map[matched_lang[0]]
if comp_map == data64_compiler_map:
print(f"Using the DATA64 compiler map")
osabi = get_osabi() osabi = get_osabi()
if osabi in comp_map: if osabi in comp_map:
return comp_map[osabi] return comp_map[osabi]
if None in comp_map: if None in comp_map:
return comp_map[None] return comp_map[None]
print(f"{osabi} not found in compiler map")
return 'default' return 'default'