Re: [PATCH 0/3] Fix issues with writing Linux core PRSTATUS note on MIPS o32, n32 and n64 into core file

Maciej W. Rozycki
2017-10-30T13:38:37Z

On Fri, 27 Oct 2017, Pedro Alves wrote:

> > (gdb) PASS: gdb.threads/tls-core.exp: load generated corefile
> > p/x foo
> > Cannot find thread-local storage for LWP 8829, executable file .../gdb/testsuite/outputs/gdb.threads/tls-core/tls-core:
> > Cannot find thread-local variables on this target
> > (gdb) FAIL: gdb.threads/tls-core.exp: print thread-local storage variable
> >
> > which I am fairly sure that is related (along with the "core file may not
> > match specified executable file." message) to an attempt to use native
> > `libthread_db'.
>
> The "core file may not match specified executable file." sounds like
> something else. I think you'll get that if the program name recorded
> in the core data structure is not the same as the name of the executable.

Given that this is not the case here, as the basename of the program is
supposed to be `tls-core' and that fits in the (regrettable) 16-character
limit for the executable name in Linux core files, there must be something
odd going on here.

> Try setting a breakpoint on core_file_matches_executable_p.

I will, thanks for the hint.

Maciej