[0/7] Add gdb support for Cygwin x86_64 core dumps

Message ID 20200701213225.14144-1-jon.turney@dronecode.org.uk
Headers show
Series
  • Add gdb support for Cygwin x86_64 core dumps
Related show

Message

Jon Turney July 1, 2020, 9:32 p.m.
As far as I know, the only way to generate these "core dumps" is to use
Cygwin's 'dumper' tool, which requires some fixes on x86_64 [1].

[1] https://cygwin.com/pipermail/cygwin-patches/2020q3/010313.html

Jon Turney (7):
  Read tid from correct offset in win32pstatus NOTE_INFO_THREAD
  Don't apply size constraint to all win32pstatus ELF notes.
  Don't hardcode CONTEXT size for a NOTE_INFO_THREAD win32pstatus note
  Add sniffer for Cygwin x86_64 core dumps
  Add amd64_windows_gregset_reg_offset
  Promote windows_core_xfer_shared_libraries and windows_core_pid_to_str
  Add handling for 64-bit module addresses in Cygwin core dumps

 bfd/ChangeLog            |  20 ++++++++
 bfd/elf.c                |  25 +++++----
 gdb/ChangeLog            |  23 +++++++++
 gdb/amd64-windows-tdep.c | 100 ++++++++++++++++++++++++++++++++++++
 gdb/i386-windows-tdep.c  | 100 +-----------------------------------
 gdb/windows-tdep.c       | 108 +++++++++++++++++++++++++++++++++++++++
 gdb/windows-tdep.h       |   8 +++
 7 files changed, 276 insertions(+), 108 deletions(-)

-- 
2.27.0

Comments

Tom Tromey July 2, 2020, 9:17 p.m. | #1
>>>>> "Jon" == Jon Turney <jon.turney@dronecode.org.uk> writes:


Jon> As far as I know, the only way to generate these "core dumps" is to use
Jon> Cygwin's 'dumper' tool, which requires some fixes on x86_64 [1].

Jon> [1] https://cygwin.com/pipermail/cygwin-patches/2020q3/010313.html

Jon> Jon Turney (7):
Jon>   Read tid from correct offset in win32pstatus NOTE_INFO_THREAD
Jon>   Don't apply size constraint to all win32pstatus ELF notes.
Jon>   Don't hardcode CONTEXT size for a NOTE_INFO_THREAD win32pstatus note
Jon>   Add sniffer for Cygwin x86_64 core dumps
Jon>   Add amd64_windows_gregset_reg_offset
Jon>   Promote windows_core_xfer_shared_libraries and windows_core_pid_to_str
Jon>   Add handling for 64-bit module addresses in Cygwin core dumps

Jon>  bfd/ChangeLog            |  20 ++++++++
Jon>  bfd/elf.c                |  25 +++++----

The BFD changes should be sent to the binutils list.

Tom
Simon Marchi July 3, 2020, midnight | #2
On 2020-07-01 5:32 p.m., Jon Turney wrote:
> As far as I know, the only way to generate these "core dumps" is to use

> Cygwin's 'dumper' tool, which requires some fixes on x86_64 [1].

> 

> [1] https://cygwin.com/pipermail/cygwin-patches/2020q3/010313.html

> 

> Jon Turney (7):

>   Read tid from correct offset in win32pstatus NOTE_INFO_THREAD

>   Don't apply size constraint to all win32pstatus ELF notes.

>   Don't hardcode CONTEXT size for a NOTE_INFO_THREAD win32pstatus note

>   Add sniffer for Cygwin x86_64 core dumps

>   Add amd64_windows_gregset_reg_offset

>   Promote windows_core_xfer_shared_libraries and windows_core_pid_to_str

>   Add handling for 64-bit module addresses in Cygwin core dumps

> 

>  bfd/ChangeLog            |  20 ++++++++

>  bfd/elf.c                |  25 +++++----

>  gdb/ChangeLog            |  23 +++++++++

>  gdb/amd64-windows-tdep.c | 100 ++++++++++++++++++++++++++++++++++++

>  gdb/i386-windows-tdep.c  | 100 +-----------------------------------

>  gdb/windows-tdep.c       | 108 +++++++++++++++++++++++++++++++++++++++

>  gdb/windows-tdep.h       |   8 +++

>  7 files changed, 276 insertions(+), 108 deletions(-)

> 

> -- 

> 2.27.0

> 


I've sent a few comments, but in general the GDB bits look fine to me.  But
as Tom said, the bfd bits need to be approved by the binutils folks.

Simon
Jon Turney July 3, 2020, 1:30 p.m. | #3
On 02/07/2020 22:17, Tom Tromey wrote:
>>>>>> "Jon" == Jon Turney <jon.turney@dronecode.org.uk> writes:

> 

> Jon> As far as I know, the only way to generate these "core dumps" is to use

> Jon> Cygwin's 'dumper' tool, which requires some fixes on x86_64 [1].

> 

> Jon> [1] https://cygwin.com/pipermail/cygwin-patches/2020q3/010313.html

> 

> Jon> Jon Turney (7):

> Jon>   Read tid from correct offset in win32pstatus NOTE_INFO_THREAD

> Jon>   Don't apply size constraint to all win32pstatus ELF notes.

> Jon>   Don't hardcode CONTEXT size for a NOTE_INFO_THREAD win32pstatus note

> Jon>   Add sniffer for Cygwin x86_64 core dumps

> Jon>   Add amd64_windows_gregset_reg_offset

> Jon>   Promote windows_core_xfer_shared_libraries and windows_core_pid_to_str

> Jon>   Add handling for 64-bit module addresses in Cygwin core dumps

> 

> Jon>  bfd/ChangeLog            |  20 ++++++++

> Jon>  bfd/elf.c                |  25 +++++----

> 

> The BFD changes should be sent to the binutils list.


Doh.  I knew that. Sorry!