================
@@ -2235,6 +2259,27 @@ ObjectFileELF::ParseSymbols(Symtab *symtab, user_id_t
start_id,
if (mapping_symbol)
continue;
}
+ } else if (IsRISCVArch(arch.GetMachine())) {
+ if (symbol.getBinding() == STB_LOCAL) {
+ char mapping_symbol = FindRISCVMappingSymbol(symbol_name);
----------------
dmpots wrote:
I'm not sure the `FindRISCVMappingSymbol` is making the code cleaner here since
we have to switch on the result anyway.
I think it would look cleaner to just check the symbol directly.
```
if (strcmp(symbol_name, "$d") == 0) {
address_class_map[symbol.st_value] = AddressClass::eCode;
continue;
}
if (strcmp(symbol_name, "$x") == 0) {
address_class_map[symbol.st_value] = AddressClass::eData;
continue;
}
```
https://github.com/llvm/llvm-project/pull/154809
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits