From 9d470034618c4d03b826923ceb157fbdbcef01ba Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Fri, 31 May 2019 19:33:07 +0200 Subject: [PATCH] Use UNIX EOL --- README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0f2807c2..2714094d 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,25 @@ -# gdb_tls (One solution for reading a value of a TLS variable from a core file generated on a target machine) +# One solution for reading a value of a TLS variable from a core file generated on a target machine -Building the tool (Multiarch version): + mkdir build cd build ~/$GDB_SRC/configure --enable-thread-access --enable-build-with-cxx=no --with-python --enable-targets=all make -Installing the tool: + mkdir INSTALL make install DESTDIR= ~/$path_to_build/INSTALL -Using the tool: -(NOTE: The version of the glibc on the host machine should match the glibc version of the target process being debugged. In the following example we built glibc 2.22, because the program being debugged from target machine (with MIPS arch) was built with glibc 2.22.). We are trying to print, by using Multiarch GNU GDB, the value of the TLS variable (declared as __thread int foo = 0xdeadbeef;) from a core file generated on a target machine. +(NOTE: The version of the glibc on the host machine should match the glibc version +of the target process being debugged. In the following example we built glibc 2.22, +because the program being debugged from target machine (with MIPS arch) was +built with glibc 2.22.. We are trying to print, by using Multiarch GNU GDB, +the value of the TLS variable (declared as __thread int foo = 0xdeadbeef;) from +a core file generated on a target machine.) + ./gdb ... @@ -21,12 +29,7 @@ (gdb) file exampleFromMipsPlatform Reading symbols from exampleFromMipsPlatform...done. (gdb) core-file core.mips -[New LWP 21808] -[New LWP 21813] -[New LWP 21810] -[New LWP 21809] -[New LWP 21811] -[New LWP 21812] +... [Thread debugging using libthread_db enabled] Using host libthread_db library "~/path_to_the_glibc22_build/INSTALL/liblibthread_db.so.1". Core was generated by `./exampleFromMipsPlatform'.