Skip to contentSkip to conversation

TLS info and core files?

DISCUSSION Tom Horsley 2 participants 2 messages Mar 27, 2007

lore
Share & tools
lore
#0 lore raw

As a debugger developer, I find it quite handy when debugging a real process to use the PTRACE_GET_THREAD_AREA or PTRACE_GET_ARCH_PRCTL calls to dig up pthread IDs without having to know too much about the internals of the pthread library. (It would be even handier if the info was more consistent across architectures :-).

In a core file, that information has all disappeared.

Should core files have NOTE entries added for some sort of thread local storage info to be recorded? (Whatever the kernel happens to know that won't be accessible anymore after the process is gone, which would probably vary from architecture to architecture.)

#1 lore raw
Quoted 6 lines · Tom Horsley

Should core files have NOTE entries added for some sort of thread local storage info to be recorded? (Whatever the kernel happens to know that won't be accessible anymore after the process is gone, which would probably vary from architecture to architecture.)

I think that would be a good idea. Shouldn't be very hard to implement. Please send a patch.

We also miss some other information in core files
I found useful in the past, like the CR3 and some other registers. The printks on x86-64 actually give more information than a core dump in some cases.

-Andi