public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: elf "note" section for win32-style thread context
  1999-07-01  0:00   ` Re[2]: " Egor Duda
@ 1999-07-01  0:00     ` Ian Lance Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 1999-07-01  0:00 UTC (permalink / raw)
  To: deo; +Cc: binutils

   Date: Mon, 10 May 1999 20:36:31 +0400
   From: Egor Duda <deo@logos-m.ru>

   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?

cygwin already depends upon BFD.

prstatus_t is used in bfd/elf.c, so it is ELF specific.  That ELF code
is not used for the cygwin target.

Moreover, the code in bfd/elf.c depends upon having a host header file
which defines the prstatus_t struct.  Therefore, it does not work when
the binutils are configured as a cross toolchain.

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re[2]: elf "note" section for win32-style thread context
  1999-07-01  0:00 ` Ian Lance Taylor
@ 1999-07-01  0:00   ` Egor Duda
  1999-07-01  0:00     ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Egor Duda @ 1999-07-01  0:00 UTC (permalink / raw)
  To: binutils; +Cc: Ian Lance Taylor

Hi!

May 10 1999 Ian Lance Taylor <ian@airs.com> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: elf "note" section for win32-style thread context
  1999-07-01  0:00 elf "note" section for win32-style thread context Egor Duda
@ 1999-07-01  0:00 ` Ian Lance Taylor
  1999-07-01  0:00   ` Re[2]: " Egor Duda
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 1999-07-01  0:00 UTC (permalink / raw)
  To: deo; +Cc: binutils

   Date: Mon, 10 May 1999 18:41:16 +0400
   From: Egor Duda <deo@logos-m.ru>

   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?

The real point of storing thread information in a core file is so that
you can examine the thread state using gdb.  So you should probably
make your decision based on what fits more naturally into the gdb
code.

The prstatus_t stuff is all ELF specific, so you would have to copy it
anyhow for the PE-based cygwin code.  The current implementation is
actually not quite right in that it relies on host header files, and
even if the right header files are available can not be built
correctly for a cross toolchain.

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* elf "note" section for win32-style thread context
@ 1999-07-01  0:00 Egor Duda
  1999-07-01  0:00 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Egor Duda @ 1999-07-01  0:00 UTC (permalink / raw)
  To: binutils

Hi!

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?

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-07-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-01  0:00 elf "note" section for win32-style thread context Egor Duda
1999-07-01  0:00 ` Ian Lance Taylor
1999-07-01  0:00   ` Re[2]: " Egor Duda
1999-07-01  0:00     ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).