Implement QGetTlsAddr query so that GDB+V gdbsrv can print __thread variables. To implement QGetTlsAddr, gdbsrv has to know how to get the glibc dtv address and the module id from the link_map. These 2 things are dependent on the internals of glibc. The dependency is mostly isolated in a few lines of arch dependent code or in an external utility that used a hack + -ldl lib to find the offset of the modid in the link_map structure. Tested on x86/amd64/ppc64. Somewhat tested on ppc32 and arm64. Untested and a few lines even not compiled on arm/mips32/mips64/s390x. Feedback welcome
Created attachment 88193 [details] Implement QGetTlsAddr in Valgrind gdbsrv (might need to touch 2 emtpy .exp files) Implement QGetTlsAddr. Note: you might have to do: touch gdbserver_tests/hgtls.stderr.exp touch gdbserver_tests/hgtls.stdoutB.exp as these are empty files, and svn diff+patch seems to have problems with empty files.
fixed in revision 14283