x86: x86 core dump TLS
authorRoland McGrath <roland@redhat.com>
Wed, 30 Jan 2008 12:31:56 +0000 (13:31 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:31:56 +0000 (13:31 +0100)
This makes ELF core dumps of 32-bit processes include a new
note type NT_386_TLS (0x200) giving the contents of the TLS
slots in struct user_desc format.  This lets post mortem
examination figure out what the segment registers mean like
the debugger does with get_thread_area on a live process.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/ptrace.c
include/linux/elf.h

index f8b89059e6ed94794e3f98f0773be699a362da0a..e6a680c7daf726543a62ab152d804d2b8ed32990 100644 (file)
@@ -1313,6 +1313,7 @@ static const struct user_regset x86_32_regsets[] = {
                .active = xfpregs_active, .get = xfpregs_get, .set = xfpregs_set
        },
        [REGSET_TLS] = {
+               .core_note_type = NT_386_TLS,
                .n = GDT_ENTRY_TLS_ENTRIES, .bias = GDT_ENTRY_TLS_MIN,
                .size = sizeof(struct user_desc),
                .align = sizeof(struct user_desc),
index 576e83bd6d88e5b6dfcad00a4136106c3c87dbec..7ceb24d87c1a970b06835f5c645bb0ab2e31f1d0 100644 (file)
@@ -355,6 +355,7 @@ typedef struct elf64_shdr {
 #define NT_AUXV                6
 #define NT_PRXFPREG     0x46e62b7f      /* copied from gdb5.1/include/elf/common.h */
 #define NT_PPC_VMX     0x100           /* PowerPC Altivec/VMX registers */
+#define NT_386_TLS     0x200           /* i386 TLS slots (struct user_desc) */
 
 
 /* Note header in a PT_NOTE section */