Community
Participate
Working Groups
Usually a separate (split) debug object file should have the same start address as the object it is derived from, but this is not the case if a library gets prelinked after debug info has been split out (see also https://bugs.kde.org/show_bug.cgi?id=185816). This address mismatch causes a failure to lookup symbols and line info because elf_find_unit() cannot locate the compilation unit for an address. E.g. consider the diffs between libc-2.19.so and its debug info file: /lib64/libc-2.19.so: file format elf64-x86-64 architecture: i386:x86-64, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED start address 0x0000003c02a20120 Program Header: PHDR off 0x0000000000000040 vaddr 0x0000003c02a00040 paddr 0x0000003c02a00040 align 2**3 filesz 0x0000000000000230 memsz 0x0000000000000230 flags r-x INTERP off 0x0000000000170800 vaddr 0x0000003c02b70800 paddr 0x0000003c02b70800 align 2**4 filesz 0x000000000000001c memsz 0x000000000000001c flags r-- LOAD off 0x0000000000000000 vaddr 0x0000003c02a00000 paddr 0x0000003c02a00000 align 2**21 filesz 0x00000000001a41c4 memsz 0x00000000001a41c4 flags r-x LOAD off 0x00000000001a4570 vaddr 0x0000003c02da4570 paddr 0x0000003c02da4570 align 2**21 filesz 0x0000000000005350 memsz 0x0000000000009a50 flags rw- /lib64/.debug/libc-2.19.so: file format elf64-x86-64 architecture: i386:x86-64, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED start address 0x0000000000020120 Program Header: PHDR off 0x0000000000000040 vaddr 0x0000000000000040 paddr 0x0000000000000040 align 2**3 filesz 0x0000000000000230 memsz 0x0000000000000230 flags r-x INTERP off 0x0000000000000290 vaddr 0x0000000000170800 paddr 0x0000000000170800 align 2**4 filesz 0x0000000000000000 memsz 0x000000000000001c flags r-- LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**21 filesz 0x0000000000000290 memsz 0x00000000001a41c4 flags r-x LOAD off 0x00000000001a4570 vaddr 0x00000000003a4570 paddr 0x00000000003a4570 align 2**21 filesz 0x0000000000000000 memsz 0x0000000000009a50 flags rw-
Marking MAJOR since this issue makes debug and analysis of the most significant sharedlibs impossible when they are prelinked.
Fixed. Thanks!
https://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/commit/?id=7c2c611f8841f8dea81d83eed83b730bee5cc37e I see that the fix needed significant code changes ; thanks very much for the quick turnaround, Eugene ! Bug 443084 has been backported to 1.2_luna for split debug info, do you think that this fix is safe to also backport or is it too big / risky ?
I think it is too risky to backport. Technically, it is new feature. Before this, we did not support files that were re-linked to a different address *after* debug info was moved to a separate file. It is miracle that the debug info is still usable after such brutal handling, and my confidence in this code is rather low.