-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
broken dwarf (LLVM-351) #98
Comments
Hi @yamt How do you compile clang? lp_uart_print (feat/ulp_debug*) » clang -c -Os -g /tmp/a.c
lp_uart_print (feat/ulp_debug*) » llvm-dwarfdump a.o
a.o: file format elf32-littleriscv
.debug_info contents:
0x00000000: Compile Unit: length = 0x0000004d, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x04 (next unit at 0x00000051)
0x0000000b: DW_TAG_compile_unit
DW_AT_producer ("Espressif clang version 17.0.1 (https://github.com/espressif/llvm-project.git esp-17.0.1_20240419)")
DW_AT_language (DW_LANG_C11)
DW_AT_name ("/tmp/a.c")
DW_AT_stmt_list (0x00000000)
DW_AT_comp_dir ("/home/alexey/projects/esp/esp-idf/examples/system/ulp/lp_core/lp_uart/lp_uart_print")
DW_AT_low_pc (0x00000000)
DW_AT_high_pc (0x00000002)
0x00000026: DW_TAG_subprogram
DW_AT_low_pc (0x00000000)
DW_AT_high_pc (0x00000002)
DW_AT_frame_base (DW_OP_reg2 X2)
DW_AT_GNU_all_call_sites (true)
DW_AT_name ("f")
DW_AT_decl_file ("/tmp/a.c")
DW_AT_decl_line (1)
DW_AT_prototyped (true)
DW_AT_type (0x00000049 "int")
DW_AT_external (true)
0x0000003b: DW_TAG_formal_parameter
DW_AT_location (DW_OP_reg10 X10)
DW_AT_name ("x")
DW_AT_decl_file ("/tmp/a.c")
DW_AT_decl_line (1)
DW_AT_type (0x00000049 "int")
0x00000048: NULL
0x00000049: DW_TAG_base_type
DW_AT_name ("int")
DW_AT_encoding (DW_ATE_signed)
DW_AT_byte_size (0x04)
0x00000050: NULL |
my configuration is:
my colleague independently had a similar symptom (broken dwarf) with https://github.com/bytecodealliance/wasm-micro-runtime/tree/main/wamr-compiler. i don't know how she built it. |
i was able to reproduce the symptom with the release assets. clang --target=xtensa-esp-unknown-elf -c -Os -g a.c |
well, actully it turned out to be a problem in llvm-dwarfdump. |
@yamt Thank you very much for the findings. We will pick it up. So let's keep this ticket open until that moment . |
the following is with
esp-17.0.1_20240419
built locally.at least, DW_AT_producer, DW_AT_name, DW_AT_decl_file, DW_AT_comp_dir seem broken.
The text was updated successfully, but these errors were encountered: