From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26573 invoked by alias); 19 Apr 2005 08:01:25 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 26471 invoked from network); 19 Apr 2005 08:01:13 -0000 Received: from unknown (HELO andromeda.onevision.de) (212.77.172.62) by sourceware.org with SMTP; 19 Apr 2005 08:01:13 -0000 Received: from [192.168.5.120] (oppenheim.onevision.de [192.168.5.120]) by andromeda.onevision.de (8.13.1/8.12.9/ROSCH/DDB) with ESMTP id j3J81Ce3003853; Tue, 19 Apr 2005 10:01:12 +0200 Message-ID: <4264BAA5.2050600@onevision.de> Date: Tue, 19 Apr 2005 08:01:00 -0000 From: Roland Schwingel User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 MIME-Version: 1.0 To: "Mark Kettenis" CC: gdb@sources.redhat.com Subject: Re: gdb stack trace problems (Addendum) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-04/txt/msg00127.txt.bz2 Hi... "Mark Kettenis" 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 : push $0x2c 0x7c80239e : push $0x7c802458 0x7c8023a3 : call 0x7c8024cb 0x7c8023a8 : movl $0x14,0xffffffc4(%ebp) 0x7c8023af : movl $0x1,0xffffffc8(%ebp) 0x7c8023b6 : xor %eax,%eax 0x7c8023b8 : lea 0xffffffcc(%ebp),%edi 0x7c8023bb : stos %eax,%es:(%edi) 0x7c8023bc : stos %eax,%es:(%edi) 0x7c8023bd : stos %eax,%es:(%edi) 0x7c8023be : xor %esi,%esi 0x7c8023c0 : push %esi 0x7c8023c1 : lea 0xffffffc4(%ebp),%eax 0x7c8023c4 : push %eax 0x7c8023c5 : call *0x7c80123c 0x7c8023cb : mov %esi,0xfffffffc(%ebp) 0x7c8023ce : pushl 0x8(%ebp) 0x7c8023d1 : lea 0xffffffd8(%ebp),%eax 0x7c8023d4 : push %eax 0x7c8023d5 : call 0x7c802470 0x7c8023da : mov %eax,0xffffffe4(%ebp) 0x7c8023dd : cmp %esi,%eax 0x7c8023df : je 0x7c802412 0x7c8023e1 : pushl 0xffffffe4(%ebp) 0x7c8023e4 : pushl 0xc(%ebp) 0x7c8023e7 : call *0x7c8014bc 0x7c8023ed : mov %eax,0xffffffe0(%ebp) 0x7c8023f0 : cmp %esi,0xc(%ebp) 0x7c8023f3 : jne 0x7c802424 0x7c8023f5 : orl $0xffffffff,0xfffffffc(%ebp) 0x7c8023f9 : call 0x7c802432 0x7c8023fe : mov $0xc0,%eax 0x7c802403 : cmp %eax,0xffffffe0(%ebp) 0x7c802406 : je 0x7c80240a 0x7c802408 : xor %eax,%eax 0x7c80240a : call 0x7c80250b 0x7c80240f : ret $0x8 0x7c802412 : mov %esi,0xffffffd8(%ebp) 0x7c802415 : movl $0x80000000,0xffffffdc(%ebp) 0x7c80241c : lea 0xffffffd8(%ebp),%eax 0x7c80241f : mov %eax,0xffffffe4(%ebp) 0x7c802422 : jmp 0x7c8023e1 0x7c802424 : cmp $0x101,%eax 0x7c802429 : je 0x7c8023e1 0x7c80242b : jmp 0x7c8023f5 0x7c80242d : nop 0x7c80242e : nop 0x7c80242f : nop 0x7c802430 : nop 0x7c802431 : nop 0x7c802432 : lea 0xffffffc4(%ebp),%eax 0x7c802435 : push %eax 0x7c802436 : call *0x7c801238 0x7c80243c : ret 0x7c80243d : nop 0x7c80243e : nop 0x7c80243f : nop 0x7c802440 : nop 0x7c802441 : nop End of assembler dump. (gdb) disas Sleep Dump of assembler code for function Sleep: 0x7c802442 : mov %edi,%edi 0x7c802444 : push %ebp 0x7c802445 : mov %esp,%ebp 0x7c802447 : push $0x0 0x7c802449 : pushl 0x8(%ebp) 0x7c80244c : call 0x7c80239c 0x7c802451 : pop %ebp 0x7c802452 : ret $0x4 0x7c802455 : nop 0x7c802456 : nop 0x7c802457 : nop 0x7c802458 : (bad) 0x7c802459 : (bad) 0x7c80245a : (bad) 0x7c80245b : incl (%eax) 0x7c80245d : add %al,(%eax) 0x7c80245f : add %dh,(%edx) 0x7c802461 : and $0x80,%al 0x7c802463 : jl 0x7c8023f5 0x7c802465 : nop 0x7c802466 : nop 0x7c802467 : nop 0x7c802468 : nop 0x7c802469 : nop 0x7c80246a : nop 0x7c80246b : nop 0x7c80246c : nop 0x7c80246d : nop 0x7c80246e : nop 0x7c80246f : nop 0x7c802470 : mov %edi,%edi 0x7c802472 : push %ebp 0x7c802473 : mov %esp,%ebp 0x7c802475 : mov 0xc(%ebp),%eax 0x7c802478 : cmp $0xffffffff,%eax 0x7c80247b : je 0x7c8092ee 0x7c802481 : mov $0x2710,%ecx 0x7c802486 : mul %ecx 0x7c802488 : mov 0x8(%ebp),%ecx 0x7c80248b : mov %eax,(%ecx) 0x7c80248d : neg %eax 0x7c80248f : mov %edx,0x4(%ecx) 0x7c802492 : adc $0x0,%edx 0x7c802495 : neg %edx 0x7c802497 : mov %eax,(%ecx) 0x7c802499 : mov %edx,0x4(%ecx) 0x7c80249c : mov %ecx,%eax 0x7c80249e : pop %ebp 0x7c80249f : ret $0x8 0x7c8024a2 : nop 0x7c8024a3 : nop 0x7c8024a4 : nop 0x7c8024a5 : nop 0x7c8024a6 : nop End of assembler dump. Good Luck, Roland