Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Add Windows x64 SEH unwinder (take 2)
@ 2013-01-09 10:53 Joel Brobecker
  2013-01-09 10:53 ` [RFA/commit+NEWS 1/2] Add command set/show debug unwind Joel Brobecker
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Joel Brobecker @ 2013-01-09 10:53 UTC (permalink / raw)
  To: gdb-patches

Hello,

This patch series adds an unwinder using the native Windows x64 SEH
data. This dramatically improves the behavior as soon as system
calls are involved. For instance, after switching to a different
thread, we now get...

    (gdb) bt
    #0  0x0000000077a46eba in ntdll!ZwWaitForSingleObject ()
       from C:\Windows\system32\ntdll.dll
    #1  0x00000000778fb380 in WaitForSingleObjectEx ()
       from C:\Windows\system32\kernel32.dll
    #2  0x000000000040a7e9 in system__task_primitives__operations__cond_wait ()
    #3  0x0000000000407c3b in system__tasking__rendezvous__accept_trivial ()
    #4  0x0000000000401f3c in task_switch.callee (<_task>=0x394410)
        at task_switch.adb:29
    #5  0x0000000000406637 in system__tasking__stages__task_wrapper ()
    [...]

... instead of:

    #0  0x0000000077a46eba in ntdll!ZwWaitForSingleObject ()
       from C:\Windows\system32\ntdll.dll
    #1  0x00000000778fb380 in WaitForSingleObjectEx ()
       from C:\Windows\system32\kernel32.dll
    #2  0x000007fffffdc000 in ?? ()
    #3  0x0000000077a266e4 in ntdll!LdrInitializeThunk ()
       from C:\Windows\system32\ntdll.dll
    #4  0x0000000000000000 in ?? ()


^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [PATCH v3] Windows x64 SEH unwinder
@ 2013-08-22 12:07 Roland Schwingel
  0 siblings, 0 replies; 32+ messages in thread
From: Roland Schwingel @ 2013-08-22 12:07 UTC (permalink / raw)
  To: Tristan Gingold
  Cc: Joel Brobecker, Pedro Alves, gdb-patches@sourceware.org ml

Hi Tristan...

gdb-patches-owner@sourceware.org wrote on 22.08.2013 11:33:10:
 > Hello,
 >
 > after discussion with Roland Schwingel, I have found that the patch
 > doesn't handle well dwarf3 DW_OP_call_frame_cfa, because the SEH
 > unwinder is before the dwarf2 one.
 >
 > So I propose this new patch.  The only change is the position of the
 > SEH unwinder: it is appended after the dwarf2 one.
 > As a consequence, old binaries should work too.
I just gave your new patch a brief trial with my gcc 4.8.2. I can 
confirm that unwinding now works as it should. I tried it with both
-g and -gdwarf-2 in gcc 4.8.2.

Thank your very much! This finally fixes my 8 years old issue.
(see http://sourceware.org/ml/gdb/2005-04/msg00113.html)

When an application crashes on windows I can see the the stack trace 
again (as it has been with gdb 5.3 in the past). Variable inspection 
with your v3 patch is also now working. No more errors.

SEH unwinding only works for 64bit but this is perfectly ok for me as I 
am fully 64bit for quite a while now!

IMHO I would say ok to commit :-)

This is IMHO a killer feature for the next gdb...

Roland


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

end of thread, other threads:[~2013-09-02  9:28 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-09 10:53 Add Windows x64 SEH unwinder (take 2) Joel Brobecker
2013-01-09 10:53 ` [RFA/commit+NEWS 1/2] Add command set/show debug unwind Joel Brobecker
2013-01-09 12:41   ` Jan Kratochvil
2013-01-09 18:40     ` Joel Brobecker
2013-01-09 15:14   ` Tom Tromey
2013-01-09 16:01   ` Eli Zaretskii
2013-01-09 10:53 ` [RFA/commit+doco 2/2] Windows x64 SEH unwinder Joel Brobecker
2013-01-09 15:52   ` Pedro Alves
2013-01-09 16:28     ` Tristan Gingold
2013-01-09 17:10       ` Pedro Alves
2013-01-09 17:53         ` Tom Tromey
2013-01-09 19:11           ` Pedro Alves
2013-01-09 20:07         ` Tristan Gingold
2013-01-10 16:24           ` Pedro Alves
2013-01-11  8:04             ` Tristan Gingold
2013-07-08 10:55             ` [RFA] Windows x64 SEH unwinder (v2) Tristan Gingold
2013-07-26 15:22               ` Pedro Alves
2013-08-19 13:59                 ` Tristan Gingold
2013-08-19 14:13                   ` Pedro Alves
2013-08-22  9:33                 ` [PATCH v3] Windows x64 SEH unwinder Tristan Gingold
2013-08-22 15:10                   ` Eli Zaretskii
2013-08-22 15:26                   ` Pedro Alves
2013-08-22 15:41                     ` Tristan Gingold
2013-08-22 16:15                       ` Pedro Alves
2013-08-23  6:54                         ` Tristan Gingold
2013-08-27 17:45                           ` Pedro Alves
2013-09-02  9:28                             ` Tristan Gingold
2013-01-09 16:06   ` [RFA/commit+doco 2/2] " Eli Zaretskii
2013-01-09 16:29     ` Tristan Gingold
2013-01-09 11:05 ` Add Windows x64 SEH unwinder (take 2) Pedro Alves
2013-01-09 11:11   ` Joel Brobecker
2013-08-22 12:07 [PATCH v3] Windows x64 SEH unwinder Roland Schwingel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox