Community
Participate
Working Groups
when putting expression (long long int)0x5566 on expression view. it got an error message "At col 6: Illegal usage of a type in expression. Invalid expression". From the tcf log: TCF Command: Expressions create "P184467437" null "(long long int)23" Replay: "At col 6: Illegal usage of a type in expression. Invalid expression" Some change has made in LLVM15: https://github.com/llvm/llvm-project/issues/58838 DW_AT_name is not same for "long long int" type from clang-14 "long long int" type in source file is translated to DW_AT_name "long long" in LLVM15. ////////////////////// Seems the code need to change: https://git.eclipse.org/r/tcf/org.eclipse.tcf.agent.git ( commitment 5e0265c2 -(2022-11-04 11:46:21 +0000)) In gent/tcf/services/symbols_elf.c 1686 if (strcmp(name, base_types_aliases[i].name) == 0) { 1687 find_in_dwarf(base_types_aliases[i].alias); change to: 1686 if (strcmp(name, base_types_aliases[i].alias) == 0) { 1687 find_in_dwarf(base_types_aliases[i].name); "base_types_aliases[i].name" is what need to find in dwarf instead of "base_types_aliases[i].alias" Is that right? /////////////////////////// relevant code: agent/tcf/services/symbols_elf.c 1616 int find_symbol_by_name(Context * ctx, int frame, ContextAddress ip, const char * name, Symbol ** res) { ..... 1685 while (base_types_aliases[i].name) { 1686 if (strcmp(name, base_types_aliases[i].name) == 0) { 1687 find_in_dwarf(base_types_aliases[i].alias); 1688 if (find_symbol_list != NULL) break; 1689 } 1690 i++; ...... } 144 } base_types_aliases[] = { 145 { "int", "signed int" }, 146 { "signed", "int" }, 147 { "signed int", "int" }, 148 { "unsigned", "unsigned int" }, 149 { "short", "short int" }, 150 { "signed short", "short int" }, 151 { "signed short int", "short int" }, 152 { "unsigned short", "unsigned short int" }, 153 { "long", "long int" }, 154 { "signed long", "long int" }, 155 { "signed long int", "long int" }, 156 { "unsigned long", "unsigned long int" }, 157 { "unsigned long", "long unsigned int" }, 158 { "long long", "long long int" }, 159 { "signed long long", "long long int" }, 160 { "signed long long int", "long long int" }, 161 { "unsigned long long", "unsigned long long int" }, 162 { "unsigned long long", "long long unsigned int" }, 163 { NULL, NULL } 164 };
Created attachment 288832 [details] sleep.out was build with llvm15 on linux
Created attachment 288833 [details] dwarf dump for sleep.out
Seems the code need to change: https://git.eclipse.org/r/tcf/org.eclipse.tcf.agent.git ( commitment 5e0265c2 -(2022-11-04 11:46:21 +0000)) In gent/tcf/services/symbols_elf.c 1686 if (strcmp(name, base_types_aliases[i].name) == 0) { 1687 find_in_dwarf(base_types_aliases[i].alias); change to: 1686 if (strcmp(name, base_types_aliases[i].alias) == 0) { 1687 find_in_dwarf(base_types_aliases[i].name); "base_types_aliases[i].name" is what need to find in dwarf instead of "base_types_aliases[
Fixed. Thanks!