From mboxrd@z Thu Jan 1 00:00:00 1970 From: Egor Duda To: Cc: Ian Lance Taylor Subject: Re[2]: elf "note" section for win32-style thread context Date: Thu, 01 Jul 1999 00:00:00 -0000 Message-id: <7858.990510@logos-m.ru> References: <19990510150327.20323.qmail@daffy.airs.com> X-SW-Source: 1999-q2/msg00008.html Hi! May 10 1999 Ian Lance Taylor wrote : >> I've got an intention to add core dumping functionality to cygwin >> library, so that cygwin application would write elf core file. As a >> part of it, there should be "note" sections to store contexts of all >> running threads. I see two possible ways to do it. I can either >> emulate through one of existing structures (prstatus_t, lwpstatus_t, >> etc.) or add new special note type for cygwin to bfd. Which way should >> i choose? ILT> The real point of storing thread information in a core file is so that ILT> you can examine the thread state using gdb. So you should probably ILT> make your decision based on what fits more naturally into the gdb ILT> code. Of course. Actually, I've tried a second way (the simple one) and it appears that it works perfectly without changing a single line in gdb sources. The only code i need to add is function in bfd/elf.c to recognize this particular NT_WIN32CONTEXT note type (yet another elfcore_grok_ function). But i wasn't sure that simplest solution is a best one :) ILT> The prstatus_t stuff is all ELF specific, so you would have to copy it ILT> anyhow for the PE-based cygwin code. The current implementation is ILT> actually not quite right in that it relies on host header files, and ILT> even if the right header files are available can not be built ILT> correctly for a cross toolchain. i'm not sure why? you mean that my changes will make cygwin depend on bfd? Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19