Bug in ddbg: incorrect stack frame
Ary Manzana
ary at esperanto.org.ar
Fri Apr 27 08:27:14 PDT 2007
Hi!
When setting a breakpoint at the start of a function (where the name of
the function is) the stack frame listing (us) is incorrect: it dosen't
include the before-last stack frame.
Example file 1 (chau.d):
----------------------------------------------------
module chau;
void foo() { // Line 3
bar();
}
void main(char[][] args) {
foo(); // Line 8
}
----------------------------------------------------
####################################################
C:\d\proj>ddbg chau
Ddbg 0.08 beta - D Debugger
Copyright (c) 2007 Jascha Wetzel
see http://ddbg.mainia.de/doc.html for documentation
Loading symbols from chau
->bp chau:3
Breakpoint set: chau.d:3 0x402010
->r
ntdll.dll loaded
KERNEL32.dll loaded
USER32.dll loaded
GDI32.dll loaded
Breakpoint 0 hit at chau.d:3 0x402010
void foo() {
->us
#0 chau.foo () at chau.d:3
#1 0x004020b8 in _main () from dmain2
#2 0x0040750d in _mainCRTStartup () from constart
#3 0x7c816fd7 in ?? () from KERNEL32.dll
####################################################
Should be:
#0 chau.foo () at chau.d:3
#1 0x0040202c in _Dmain (args = 0x0012ff4c00000001) at chau.d:8
#2 0x004020b8 in _main () from dmain2
#3 0x0040750d in _mainCRTStartup () from constart
#4 0x7c816fd7 in ?? () from KERNEL32.dll
Example file 2:
----------------------------------------------------
module chau;
void bar() { // Line 3
}
void foo() {
bar(); // Line 7
}
void main(char[][] args) {
foo(); // Line 11
}
----------------------------------------------------
####################################################
C:\d\proj>ddbg chau
Ddbg 0.08 beta - D Debugger
Copyright (c) 2007 Jascha Wetzel
see http://ddbg.mainia.de/doc.html for documentation
Loading symbols from chau
->bp hola:3
Soure file "hola" not found
->bp chau:3
Breakpoint set: chau.d:3 0x402010
->r
ntdll.dll loaded
KERNEL32.dll loaded
USER32.dll loaded
GDI32.dll loaded
Breakpoint 0 hit at chau.d:3 0x402010
void bar() {
->us
#0 chau.bar () at chau.d:3
#1 0x0040202c in _Dmain (args = 0x0012ff4c00000001) at chau.d:11
#2 0x004020c4 in _main () from dmain2
#3 0x0040750d in _mainCRTStartup () from constart
#4 0x7c816fd7 in ?? () from KERNEL32.dll
####################################################
Should be:
#0 chau.bar () at chau.d:3
#1 0x0040202c in char.foo () at chau.d:7
#2 0x0040202c in _Dmain (args = 0x0012ff4c00000001) at chau.d:11
#3 0x004020c4 in _main () from dmain2
#4 0x0040750d in _mainCRTStartup () from constart
#5 0x7c816fd7 in ?? () from KERNEL32.dll
More information about the Digitalmars-d-debugger
mailing list