Community
Participate
Working Groups
Created attachment 288636 [details] source code file when try to load binary for debugging, the TCF reported: "Invalid FORM_STRX attribute, Error reading DWARF data". It reported from dio_ReadFormStringIndex() function, agent/tcf/services/dwarfio.c file as folowing: str_exception(ERR_INV_DWARF, "Invalid FORM_STRX attribute"); Attached sample source code and binary file (format = DWARF32, version = 0x0005) compiled with llvm-14.0.5.1 from the source with DWARF 5. compared with DWARF 4 that compiled with llvm 13, the following section are new: .debug_line_str .debug_addr .debug_str_offsets this test case works fine with GDB.
Created attachment 288637 [details] binary file compiled with llvm 14 with DWARF 5
I cannot reproduce. TCF DWARF reader test shows no errors. Running the file fails: eugene@gate:~/projects/tcf/bugs/580414$ ./main.out -bash: ./main.out: cannot execute binary file: Exec format error Please, provide "steps to reproduce".
The attached file is a kernel module for VxWorks. It cannot run form shell. And this issue is also for all of arch (arm, ppc and x86 etc.). I don't know how to reproduce this issue with Linux kernel module. Can the TCF debug a kernel module on native Linux? It seems it works fine for user application. Could you just load the kernel module and try to start the "mytest" function with TCF? Since the TCF will report error before really executing it.
> Can the TCF debug a kernel module on native Linux? No, not a kernel module. TCF can debug Linux application. If it is a problem with DWARF, then it should be reproducible by re-building the test as Linux application. If same code works as application, but does not work as kernel module, it is strong indication it is not a TCF problem. > Could you just load the kernel module and try to start the "mytest" > function with TCF? No, I cannot. We don't have VxWorks around here in AMD.
I can reproduce this issue on Ubuntu 22.04 LTS with Ubuntu clang version 14.0.0-1ubuntu1 and native eclipse with TCF (eclipse-cpp-2022-06-R-linux-gtk, and TCF). I built the test case with the attached makfile and c source code sample. When I debug with TCF, it can stop in _start function, then continue, the main function can not stop, and "Invalid FORM_STRX attribute" reported. But if I built with -gdwarf-4, the main function will stop. eclipse-cpp-2022-06-R-linux-gtk-x86_64.tar.gz and TCF. pek-ide-u22: agent$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy pek-ide-u22: c$ clang --version Ubuntu clang version 14.0.0-1ubuntu1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin
Created attachment 288639 [details] used to reproduce on native ubuntu 22.04 with clang 14
In other words, the main can be stopped when built with DWRARF 4. But the main can not stop with DWARF 5 and reported "Invalid FORM_STRX attribute" error.
Fixed. Thanks!