Re: sysroot and coredump debugging
Lluís Batlle i Rossell via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <ufyaa6qnpxiw7ubjd7vgmxl7fb7fkh52f5tmfbjfdskea35vrf@nyekd6qoqrfb> |
On Thu, Apr 24, 2025 at 03:01:56PM +0100, Luis Machado wrote: > On 4/23/25 14:06, LluÃs Batlle i Rossell via Gdb wrote: > > I expect that I can run this in my development computer, after downloading > > the core dump from the target system: > > (gdb) set sysroot /mysysroot > > (gdb) file myelf # it has debug info > > (gdb) core-file core > > > > And this never works; it drops the file with the symbols, thinking it's > > unrelated to the core dump: > > > > warning: Can't open file /home/user/myelf during file-backed mapping note > > processing > > warning: core file may not match specified executable file. > > Unfortunately I think this is an area where improvements could be made. I know > we have "substitute-path", but that's only for sources. In theory setting sysroot > should work, but it doesn't seem to. > > We want gdb to be strict about making sure the core file matches the ELF file, but > we could have some adjustability here. The "same absolute path" is never required when debugging core dumps without sysroot, for dump/elf matching. Why does the sysroot introduce that requirement? It looks like there is a small mistake somewhere, rather than intended behavior.