This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb stack trace problems (Addendum)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]