Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Roland Schwingel <roland.schwingel@onevision.de>
To: "Mark Kettenis" <mark.kettenis@xs4all.nl>
Cc: gdb@sources.redhat.com
Subject: Re: gdb stack trace problems (Addendum)
Date: Tue, 19 Apr 2005 08:01:00 -0000	[thread overview]
Message-ID: <4264BAA5.2050600@onevision.de> (raw)

Hi...

"Mark Kettenis" <mark.kettenis@xs4all.nl> wrote on 19.04.2005 09:45:25:
 > Hi Roland,
 >
 > [Dropped Dan, he's busy enough with other stuff, and he can always 
read it
 > on the list]
 >
 > > Also I want to mention that it might have something to do with 
threading.
 > > In a nonthreaded app I don't have any problems with gdb 6.3.50 stack
 > > dumping.
 >
 > Only if it links in different code, or is multi-threading still 
cooperative
 > on Windblows.  Anyway, what I really need is the disassembly for 
SleepEx as
 > implemented in the DLL.

Here it comes... Including its call to Sleep() in the DLL (both localted 
in kernel32).
BTW. I run WinXP SP2.

(gdb) info dll
DLL Name                              Load Address
ntdll.dll                             7c911000
/vol/c/WINDOWS/system32/kernel32.dll  7c801000
/vol/c/WINDOWS/system32/msvcrt.dll    77be1000
gdb) disas SleepEx
Dump of assembler code for function SleepEx:
0x7c80239c <SleepEx+0>: push   $0x2c
0x7c80239e <SleepEx+2>: push   $0x7c802458
0x7c8023a3 <SleepEx+7>: call   0x7c8024cb <ReleaseMutex+36>
0x7c8023a8 <SleepEx+12>:        movl   $0x14,0xffffffc4(%ebp)
0x7c8023af <SleepEx+19>:        movl   $0x1,0xffffffc8(%ebp)
0x7c8023b6 <SleepEx+26>:        xor    %eax,%eax
0x7c8023b8 <SleepEx+28>:        lea    0xffffffcc(%ebp),%edi
0x7c8023bb <SleepEx+31>:        stos   %eax,%es:(%edi)
0x7c8023bc <SleepEx+32>:        stos   %eax,%es:(%edi)
0x7c8023bd <SleepEx+33>:        stos   %eax,%es:(%edi)
0x7c8023be <SleepEx+34>:        xor    %esi,%esi
0x7c8023c0 <SleepEx+36>:        push   %esi
0x7c8023c1 <SleepEx+37>:        lea    0xffffffc4(%ebp),%eax
0x7c8023c4 <SleepEx+40>:        push   %eax
0x7c8023c5 <SleepEx+41>:        call   *0x7c80123c
0x7c8023cb <SleepEx+47>:        mov    %esi,0xfffffffc(%ebp)
0x7c8023ce <SleepEx+50>:        pushl  0x8(%ebp)
0x7c8023d1 <SleepEx+53>:        lea    0xffffffd8(%ebp),%eax
0x7c8023d4 <SleepEx+56>:        push   %eax
0x7c8023d5 <SleepEx+57>:        call   0x7c802470 <Sleep+46>
0x7c8023da <SleepEx+62>:        mov    %eax,0xffffffe4(%ebp)
0x7c8023dd <SleepEx+65>:        cmp    %esi,%eax
0x7c8023df <SleepEx+67>:        je     0x7c802412 <SleepEx+118>
0x7c8023e1 <SleepEx+69>:        pushl  0xffffffe4(%ebp)
0x7c8023e4 <SleepEx+72>:        pushl  0xc(%ebp)
0x7c8023e7 <SleepEx+75>:        call   *0x7c8014bc
0x7c8023ed <SleepEx+81>:        mov    %eax,0xffffffe0(%ebp)
0x7c8023f0 <SleepEx+84>:        cmp    %esi,0xc(%ebp)
0x7c8023f3 <SleepEx+87>:        jne    0x7c802424 <SleepEx+136>
0x7c8023f5 <SleepEx+89>:        orl    $0xffffffff,0xfffffffc(%ebp)
0x7c8023f9 <SleepEx+93>:        call   0x7c802432 <SleepEx+150>
0x7c8023fe <SleepEx+98>:        mov    $0xc0,%eax
0x7c802403 <SleepEx+103>:       cmp    %eax,0xffffffe0(%ebp)
0x7c802406 <SleepEx+106>:       je     0x7c80240a <SleepEx+110>
0x7c802408 <SleepEx+108>:       xor    %eax,%eax
0x7c80240a <SleepEx+110>:       call   0x7c80250b <ReleaseMutex+100>
0x7c80240f <SleepEx+115>:       ret    $0x8
0x7c802412 <SleepEx+118>:       mov    %esi,0xffffffd8(%ebp)
0x7c802415 <SleepEx+121>:       movl   $0x80000000,0xffffffdc(%ebp)
0x7c80241c <SleepEx+128>:       lea    0xffffffd8(%ebp),%eax
0x7c80241f <SleepEx+131>:       mov    %eax,0xffffffe4(%ebp)
0x7c802422 <SleepEx+134>:       jmp    0x7c8023e1 <SleepEx+69>
0x7c802424 <SleepEx+136>:       cmp    $0x101,%eax
0x7c802429 <SleepEx+141>:       je     0x7c8023e1 <SleepEx+69>
0x7c80242b <SleepEx+143>:       jmp    0x7c8023f5 <SleepEx+89>
0x7c80242d <SleepEx+145>:       nop   
0x7c80242e <SleepEx+146>:       nop   
0x7c80242f <SleepEx+147>:       nop   
0x7c802430 <SleepEx+148>:       nop   
0x7c802431 <SleepEx+149>:       nop   
0x7c802432 <SleepEx+150>:       lea    0xffffffc4(%ebp),%eax
0x7c802435 <SleepEx+153>:       push   %eax
0x7c802436 <SleepEx+154>:       call   *0x7c801238
0x7c80243c <SleepEx+160>:       ret   
0x7c80243d <SleepEx+161>:       nop   
0x7c80243e <SleepEx+162>:       nop   
0x7c80243f <SleepEx+163>:       nop   
0x7c802440 <SleepEx+164>:       nop   
0x7c802441 <SleepEx+165>:       nop   
End of assembler dump.
(gdb) disas Sleep
Dump of assembler code for function Sleep:
0x7c802442 <Sleep+0>:   mov    %edi,%edi
0x7c802444 <Sleep+2>:   push   %ebp
0x7c802445 <Sleep+3>:   mov    %esp,%ebp
0x7c802447 <Sleep+5>:   push   $0x0
0x7c802449 <Sleep+7>:   pushl  0x8(%ebp)
0x7c80244c <Sleep+10>:  call   0x7c80239c <SleepEx>
0x7c802451 <Sleep+15>:  pop    %ebp
0x7c802452 <Sleep+16>:  ret    $0x4
0x7c802455 <Sleep+19>:  nop   
0x7c802456 <Sleep+20>:  nop   
0x7c802457 <Sleep+21>:  nop   
0x7c802458 <Sleep+22>:  (bad) 
0x7c802459 <Sleep+23>:  (bad) 
0x7c80245a <Sleep+24>:  (bad) 
0x7c80245b <Sleep+25>:  incl   (%eax)
0x7c80245d <Sleep+27>:  add    %al,(%eax)
0x7c80245f <Sleep+29>:  add    %dh,(%edx)
0x7c802461 <Sleep+31>:  and    $0x80,%al
0x7c802463 <Sleep+33>:  jl     0x7c8023f5 <SleepEx+89>
0x7c802465 <Sleep+35>:  nop   
0x7c802466 <Sleep+36>:  nop   
0x7c802467 <Sleep+37>:  nop   
0x7c802468 <Sleep+38>:  nop   
0x7c802469 <Sleep+39>:  nop   
0x7c80246a <Sleep+40>:  nop   
0x7c80246b <Sleep+41>:  nop   
0x7c80246c <Sleep+42>:  nop   
0x7c80246d <Sleep+43>:  nop   
0x7c80246e <Sleep+44>:  nop   
0x7c80246f <Sleep+45>:  nop   
0x7c802470 <Sleep+46>:  mov    %edi,%edi
0x7c802472 <Sleep+48>:  push   %ebp
0x7c802473 <Sleep+49>:  mov    %esp,%ebp
0x7c802475 <Sleep+51>:  mov    0xc(%ebp),%eax
0x7c802478 <Sleep+54>:  cmp    $0xffffffff,%eax
0x7c80247b <Sleep+57>:  je     0x7c8092ee <KERNEL32!GetTickCount+66>
0x7c802481 <Sleep+63>:  mov    $0x2710,%ecx
0x7c802486 <Sleep+68>:  mul    %ecx
0x7c802488 <Sleep+70>:  mov    0x8(%ebp),%ecx
0x7c80248b <Sleep+73>:  mov    %eax,(%ecx)
0x7c80248d <Sleep+75>:  neg    %eax
0x7c80248f <Sleep+77>:  mov    %edx,0x4(%ecx)
0x7c802492 <Sleep+80>:  adc    $0x0,%edx
0x7c802495 <Sleep+83>:  neg    %edx
0x7c802497 <Sleep+85>:  mov    %eax,(%ecx)
0x7c802499 <Sleep+87>:  mov    %edx,0x4(%ecx)
0x7c80249c <Sleep+90>:  mov    %ecx,%eax
0x7c80249e <Sleep+92>:  pop    %ebp
0x7c80249f <Sleep+93>:  ret    $0x8
0x7c8024a2 <Sleep+96>:  nop   
0x7c8024a3 <Sleep+97>:  nop   
0x7c8024a4 <Sleep+98>:  nop   
0x7c8024a5 <Sleep+99>:  nop   
0x7c8024a6 <Sleep+100>: nop   
End of assembler dump.

Good Luck,

Roland


             reply	other threads:[~2005-04-19  8:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-19  8:01 Roland Schwingel [this message]
     [not found] ` <4268B942.5080300@onevision.de>
2005-04-22 17:51   ` Mark Kettenis
  -- strict thread matches above, loose matches on Subject: below --
2005-05-10  8:39 Roland Schwingel
2005-05-10  8:38 Roland Schwingel
2005-05-02  7:04 Roland Schwingel
2005-05-08 13:31 ` Mark Kettenis
2005-05-08 23:20   ` Christopher Faylor
2005-05-09  4:48     ` Eli Zaretskii
2005-05-09  5:26       ` Christopher Faylor
2005-05-09  5:30     ` Stan Shebs
2005-04-26 11:53 Roland Schwingel
2005-04-26  9:11 Roland Schwingel
2005-04-25 12:35 Roland Schwingel
2005-04-25  8:00 ` Roland Schwingel
2005-04-25 19:35 ` Mark Kettenis
2005-04-25 19:45   ` Daniel Jacobowitz
2005-04-25 20:37     ` Mark Kettenis
2005-04-19  7:34 Roland Schwingel
2005-04-19  7:45 ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4264BAA5.2050600@onevision.de \
    --to=roland.schwingel@onevision.de \
    --cc=gdb@sources.redhat.com \
    --cc=mark.kettenis@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox