Author Topic: debug issues  (Read 7920 times)

Offline cbuser2

  • Multiple posting newcomer
  • *
  • Posts: 33
debug issues
« on: November 15, 2012, 01:49:25 am »
Hi all. I am using 12.11 nightly in Windows 7 64-bit.

I had thought that the debugger worked fine after installing 12.11(see my other recent threads), but after some usage, 2 issues have emerged.

1. The Watches windows remains blank throughout the debugging.
2. For some reason, the debugger steps into the code for printf() every time printf() is called. It opens up stdio.h, and steps into the printf() function, and then steps back into my program and continues. Every time printf() is encountered, the debugger steps into the printf() function. I don't know if this is due to me changing some settings whilst trying to fix issue #1.

Are there some settings that I could change to resolve these issues? I've also tried the 8500 nightly, with the same results.

Thanks in advance.

Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\thismoment\Documents\c programming\test5\
Adding source dir: C:\Users\thismoment\Documents\c programming\test5\
Adding file: C:\Users\thismoment\Documents\c programming\test5\bin\Debug\test5.exe
Changing directory to: C:/Users/THISMO~1/DOCUME~1/CPROGR~1/test5/.
Set variable: PATH=.;C:\MinGW32\bin;C:\MinGW32;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\curl-7.28.0\lib;\
Starting debugger: C:\MinGW32\bin\gdb.exe -nx -fullname  -quiet  -args C:/Users/THISMO~1/DOCUME~1/CPROGR~1/test5/bin/Debug/test5.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 1156
At C:\Users\thismoment\Documents\c programming\test5\main.c:7
At C:\Users\thismoment\Documents\c programming\test5\main.c:8
At c:\mingw32\include\stdio.h:255
At c:\mingw32\include\stdio.h:256
At c:\mingw32\include\stdio.h:258
At c:\mingw32\include\stdio.h:259
At C:\Users\thismoment\Documents\c programming\test5\main.c:10
At C:\Users\thismoment\Documents\c programming\test5\main.c:11
In __mingw_CRTStartup () ()
In [email protected] () ()
In KERNEL32!BasepFreeActivationContextActivationBlock () (C:\Windows\syswow64\kernel32.dll)
In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrVerifyImageMatchesChecksum () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrVerifyImageMatchesChecksum () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrVerifyImageMatchesChecksum () (C:\Windows\system32\ntdll.dll)
In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlInitializeContext () (C:\Windows\system32\ntdll.dll)
In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlInitializeContext () (C:\Windows\system32\ntdll.dll)
In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)
In ntdll!isdigit () (C:\Windows\system32\ntdll.dll)
In ntdll!RtlFindSetBits () (C:\Windows\system32\ntdll.dll)
[Inferior 1 (process 1156) exited normally]
Debugger finished with status 0


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13235
    • Travis build status
Re: debug issues
« Reply #1 on: November 15, 2012, 01:52:19 am »
1. The Watches windows remains blank throughout the debugging.
If you don't add watches there, it will remain blank...
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks#Add_Watches

2. For some reason, the debugger steps into the code for printf() every time printf() is called. It opens up stdio.h, and steps into the printf() function, and then steps back into my program and continues. Every time printf() is encountered, the debugger steps into the printf() function. I don't know if this is due to me changing some settings whilst trying to fix issue #1.
I don't know why this happens, but you should have to paste the full log (see the settings how to enable it).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cbuser2

  • Multiple posting newcomer
  • *
  • Posts: 33
Re: debug issues
« Reply #2 on: November 15, 2012, 02:13:51 am »
Code
[quote author=oBFusCATed link=topic=17085.msg116814#msg116814 date=1352940739]
[quote author=cbuser2 link=topic=17085.msg116813#msg116813 date=1352940565]
1. The Watches windows remains blank throughout the debugging.
[/quote]
If you don't add watches there, it will remain blank...
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks#Add_Watches

Thanks. That worked. :D

But I noticed this in the Watches section of the wiki:
Code
The automatic inclusion of local variables and function arguments have not being reimplemented. Sorry about the inconvenience.

Automatic inclusion of local variables and function arguments would make CB nightlies twice as good as they are now.

Also:

Code
Click in the empty last row in the watches window, type the name of the variable (or full expression) and hit enter.

Empty last "column" would make it clearer than "row".

2. For some reason, the debugger steps into the code for printf() every time printf() is called. It opens up stdio.h, and steps into the printf() function, and then steps back into my program and continues. Every time printf() is encountered, the debugger steps into the printf() function. I don't know if this is due to me changing some settings whilst trying to fix issue #1.
I don't know why this happens, but you should have to paste the full log (see the settings how to enable it).
[/quote]

The funny thing is, this problem only occurred after I changed settings to try to fix the Watches problem. Namely, the below setting, which I found in this forum:

Code
Uncheck "Settings -> Compiler and debugger... -> Global compiler settings -> [your compiler] -> Other settings -> Advanced options... -> Others -> Use full paths for source files (GDB workaround):" and do a full rebuild.

I've since re-checked this option, but the problem remains.
« Last Edit: November 15, 2012, 02:17:07 am by cbuser2 »

Offline cbuser2

  • Multiple posting newcomer
  • *
  • Posts: 33
Re: debug issues
« Reply #3 on: November 15, 2012, 03:27:34 am »
Ok, here is the full debug log, for the simple program below. Any ideas why the debugger is stepping into the printf() function?

Code
#include <stdio.h>

int main(void)
{
    int a, b, c;

    a = 1, b = 2, c = 3;
    printf("a:%d\tb:%d\tc:%d\n", a, b, c);
    puts("Hello world");

    return 0;
}

Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\thismoment\Documents\c programming\test5\
Adding source dir: C:\Users\thismoment\Documents\c programming\test5\
Adding file: C:\Users\thismoment\Documents\c programming\test5\bin\Debug\test5.exe
Changing directory to: C:/Users/THISMO~1/DOCUME~1/CPROGR~1/test5/.
Set variable: PATH=.;C:\MinGW32\bin;C:\MinGW32;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\curl-7.28.0\lib;\

[debug]Command-line: C:\MinGW32\bin\gdb.exe -nx -fullname  -quiet  -args C:/Users/THISMO~1/DOCUME~1/CPROGR~1/test5/bin/Debug/test5.exe
[debug]Working dir : C:\Users\THISMO~1\DOCUME~1\CPROGR~1\test5

Starting debugger: C:\MinGW32\bin\gdb.exe -nx -fullname  -quiet  -args C:/Users/THISMO~1/DOCUME~1/CPROGR~1/test5/bin/Debug/test5.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from C:\Users\THISMO~1\DOCUME~1\CPROGR~1\test5\bin\Debug\test5.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.5

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\code blocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Users/THISMO~1/DOCUME~1/CPROGR~1/test5/
[debug]Source directories searched: C:/Users/THISMO~1/DOCUME~1/CPROGR~1/test5;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Users/thismoment/Documents/c programming/test5/main.c:12"
[debug]Breakpoint 2 at 0x4013b8: file C:\Users\thismoment\Documents\c programming\test5\main.c, line 12.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Users\THISMO~1\DOCUME~1\CPROGR~1\test5\bin\Debug\test5.exe

Child process PID: 5212

[debug][New Thread 5212.0x14d8]
[debug]Breakpoint 2, main () at C:\Users\thismoment\Documents\c programming\test5\main.c:12
[debug]C:\Users\thismoment\Documents\c programming\test5\main.c:12:174:beg:0x4013b8
[debug]>>>>>>cb_gdb:

At C:\Users\thismoment\Documents\c programming\test5\main.c:12

[debug]> step
[debug]0x004010fd in __mingw_CRTStartup ()
[debug]>>>>>>cb_gdb:

In __mingw_CRTStartup () ()

[debug]> bt 30
[debug]#0  0x004010fd in __mingw_CRTStartup ()
[debug]#1  0x00401295 in mainCRTStartup ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function __mingw_CRTStartup,
[debug]which has no line number information.
[debug]0x00406754 in [email protected] ()
[debug]>>>>>>cb_gdb:

In [email protected] () ()

[debug]> bt 30
[debug]#0  0x00406754 in [email protected] ()
[debug]#1  0x0040110c in __mingw_CRTStartup ()
[debug]#2  0x7efde000 in ?? ()
[debug]#3  0x77919ef2 in ntdll!RtlpNtSetValueKey () from C:\Windows\system32\ntdll.dll
[debug]#4  0x7efde000 in ?? ()
[debug]#5  0x77919ec5 in ntdll!RtlpNtSetValueKey () from C:\Windows\system32\ntdll.dll
[debug]#6  0x00401280 in [email protected] ()
[debug]#7  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function [email protected],
[debug]which has no line number information.
[debug]0x76a879f8 in KERNEL32!BasepFreeActivationContextActivationBlock () from C:\Windows\syswow64\kernel32.dll
[debug]>>>>>>cb_gdb:

In KERNEL32!BasepFreeActivationContextActivationBlock () (C:\Windows\syswow64\kernel32.dll)

[debug]> bt 30
[debug]#0  0x76a879f8 in KERNEL32!BasepFreeActivationContextActivationBlock () from C:\Windows\syswow64\kernel32.dll
[debug]#1  0x0040110c in __mingw_CRTStartup ()
[debug]#2  0x7efde000 in ?? ()
[debug]#3  0x77919ef2 in ntdll!RtlpNtSetValueKey () from C:\Windows\system32\ntdll.dll
[debug]#4  0x7efde000 in ?? ()
[debug]#5  0x77919ec5 in ntdll!RtlpNtSetValueKey () from C:\Windows\system32\ntdll.dll
[debug]#6  0x00401280 in [email protected] ()
[debug]#7  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function KERNEL32!BasepFreeActivationContextActivationBlock,
[debug]which has no line number information.
[debug]0x7792d4e0 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7792d4e0 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#1  0x76a87a0d in KERNEL32!BasepFreeActivationContextActivationBlock () from C:\Windows\syswow64\kernel32.dll
[debug]#2  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!TpSetPoolStackInformation,
[debug]which has no line number information.
[debug]0x7792d6d9 in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!LdrVerifyImageMatchesChecksum () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7792d6d9 in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]#1  0x7792d4ef in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#2  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!LdrVerifyImageMatchesChecksum,
[debug]which has no line number information.
[debug]0x7790df40 in ntdll!LdrWx86FormatVirtualImage () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7790df40 in ntdll!LdrWx86FormatVirtualImage () from C:\Windows\system32\ntdll.dll
[debug]#1  0x7792d723 in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]#2  0x0028fe40 in ?? ()
[debug]#3  0x7792d6ee in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]#4  0x0028ff14 in ?? ()
[debug]#5  0x7792d4ef in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#6  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!LdrWx86FormatVirtualImage,
[debug]which has no line number information.
[debug]0x7792d723 in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!LdrVerifyImageMatchesChecksum () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7792d723 in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]#1  0x0028fe40 in ?? ()
[debug]#2  0x7792d6ee in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]#3  0x0028ff14 in ?? ()
[debug]#4  0x7792d4ef in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#5  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!LdrVerifyImageMatchesChecksum,
[debug]which has no line number information.
[debug]0x7790e134 in ntdll!LdrWx86FormatVirtualImage () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!LdrWx86FormatVirtualImage () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7790e134 in ntdll!LdrWx86FormatVirtualImage () from C:\Windows\system32\ntdll.dll
[debug]#1  0x7792d75f in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]#2  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!LdrWx86FormatVirtualImage,
[debug]which has no line number information.
[debug]0x7792d75f in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!LdrVerifyImageMatchesChecksum () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7792d75f in ntdll!LdrVerifyImageMatchesChecksum () from C:\Windows\system32\ntdll.dll
[debug]#1  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!LdrVerifyImageMatchesChecksum,
[debug]which has no line number information.
[debug]0x7792d4ef in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7792d4ef in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#1  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!TpSetPoolStackInformation,
[debug]which has no line number information.
[debug]0x779022a0 in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x779022a0 in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll
[debug]#1  0x7792d4fa in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#2  0x779e20c0 in ntdll!_itow () from C:\Windows\system32\ntdll.dll
[debug]#3  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!LdrQueryProcessModuleInformation,
[debug]which has no line number information.
[debug]0x7792d4fa in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7792d4fa in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#1  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!TpSetPoolStackInformation,
[debug]which has no line number information.
[debug]0x779022a0 in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x779022a0 in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll
[debug]#1  0x7792d505 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#2  0x779e2100 in ntdll!_itow () from C:\Windows\system32\ntdll.dll
[debug]#3  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!LdrQueryProcessModuleInformation,
[debug]which has no line number information.
[debug]0x7792d505 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7792d505 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#1  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!TpSetPoolStackInformation,
[debug]which has no line number information.
[debug]0x7791816c in ntdll!RtlInitializeContext () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!RtlInitializeContext () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7791816c in ntdll!RtlInitializeContext () from C:\Windows\system32\ntdll.dll
[debug]#1  0x7792d516 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#2  0x006a0000 in ?? ()
[debug]#3  0x76a87a0d in KERNEL32!BasepFreeActivationContextActivationBlock () from C:\Windows\syswow64\kernel32.dll
[debug]#4  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!RtlInitializeContext,
[debug]which has no line number information.
[debug]0x779022a0 in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x779022a0 in ntdll!LdrQueryProcessModuleInformation () from C:\Windows\system32\ntdll.dll
[debug]#1  0x779181a5 in ntdll!RtlInitializeContext () from C:\Windows\system32\ntdll.dll
[debug]#2  0x006a0138 in ?? ()
[debug]#3  0x7792d516 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#4  0x006a0000 in ?? ()
[debug]#5  0x76a87a0d in KERNEL32!BasepFreeActivationContextActivationBlock () from C:\Windows\syswow64\kernel32.dll
[debug]#6  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!LdrQueryProcessModuleInformation,
[debug]which has no line number information.
[debug]0x779181a5 in ntdll!RtlInitializeContext () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!RtlInitializeContext () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x779181a5 in ntdll!RtlInitializeContext () from C:\Windows\system32\ntdll.dll
[debug]#1  0x779e2100 in ntdll!_itow () from C:\Windows\system32\ntdll.dll
[debug]#2  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!RtlInitializeContext,
[debug]which has no line number information.
[debug]0x7792d516 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!TpSetPoolStackInformation () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x7792d516 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#1  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!TpSetPoolStackInformation,
[debug]which has no line number information.
[debug]0x778ffc90 in ntdll!isdigit () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!isdigit () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x778ffc90 in ntdll!isdigit () from C:\Windows\system32\ntdll.dll
[debug]#1  0x7792d521 in ntdll!TpSetPoolStackInformation () from C:\Windows\system32\ntdll.dll
[debug]#2  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!isdigit,
[debug]which has no line number information.
[debug]0x778ffc9b in ntdll!RtlFindSetBits () from C:\Windows\system32\ntdll.dll
[debug]>>>>>>cb_gdb:

In ntdll!RtlFindSetBits () (C:\Windows\system32\ntdll.dll)

[debug]> bt 30
[debug]#0  0x778ffc9b in ntdll!RtlFindSetBits () from C:\Windows\system32\ntdll.dll
[debug]#1  0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Single stepping until exit from function ntdll!RtlFindSetBits,
[debug]which has no line number information.
[debug][Inferior 1 (process 5212) exited normally]
[debug]>>>>>>cb_gdb:

[Inferior 1 (process 5212) exited normally]

[debug]> quit

Debugger finished with status 0

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13235
    • Travis build status
Re: debug issues
« Reply #4 on: November 15, 2012, 09:17:53 am »
Code
Click in the empty last row in the watches window, type the name of the variable (or full expression) and hit enter.

Empty last "column" would make it clearer than "row".
In fact it is the first column of the last row.

I've since re-checked this option, but the problem remains.
Have you done a full rebuild?

What command are you using - "Step into" or "Next line" to get this kind of log?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cbuser2

  • Multiple posting newcomer
  • *
  • Posts: 33
Re: debug issues
« Reply #5 on: November 15, 2012, 11:26:53 pm »

Have you done a full rebuild?

What command are you using - "Step into" or "Next line" to get this kind of log?

I did a rebuild, and using "step into". This is not really a big problem for me, because I can just press "step out" when it steps into a printf(), although I would prefer not having to do this at all. :D

As a point of comparison, I was playing around with MSVC++, and "step into" steps into every c library function, not only printf(). It has a "step over" function, but it is still a pain in the a$$ having to toggle between step into and step over so often.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13235
    • Travis build status
Re: debug issues
« Reply #6 on: November 15, 2012, 11:32:17 pm »
Hm, so are you complaining that C::B and GDB have done what you've asked them to do?

If you want to go to the next line/statement use the "next line" command and if you want to step into the function on the current line use the step into.
VStudios debugger allows the user to specify function that are skipped by the step-into command, but GDB doesn't support it yet, so you can't have it in C::B, too.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cbuser2

  • Multiple posting newcomer
  • *
  • Posts: 33
Re: debug issues
« Reply #7 on: November 15, 2012, 11:53:16 pm »
If posting about a problem is what you would define as complaining, then yes, I suppose I am complaining.

I thought that it was a problem, since it did not happen before, and does not happen with CB for linux(using "step into"). And not sure why only with printf() either.

If stepping into printf() is what CB and gdb are designed to do(which it did not do before, and which does not happen with the linux version), then I suppose this is not a problem at all, so I'll stop wasting everyone's time.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13235
    • Travis build status
Re: debug issues
« Reply #8 on: November 16, 2012, 12:35:18 am »
It does step into because for some reason there is debug information for printf and before that there wasn't (probably you've upgraded something).
You can try the same on linux by installing the debug information for glibc :)

Keep in mind that for best experience you should do:
Code
next
next
next
ooo, this is my function I want to inspect -> step into
next
next
next
instead of
Code
step info
step into
uf step into entered this strange functions, so I must step out before I can continue
ooo, this is my function I want to inspect -> step into
step info
step info
step info

Do you see the difference?
« Last Edit: November 16, 2012, 12:37:40 am by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cbuser2

  • Multiple posting newcomer
  • *
  • Posts: 33
Re: debug issues
« Reply #9 on: November 16, 2012, 09:56:55 am »
Yes I do. Thank you.

I am new to debugging, and "step into" was the only thing I knew how to do. :D