User forums > General (but related to Code::Blocks)
Cannot evaluate function -- may be inlined
smallB:
@obfuscated, I do listen but I didn't have (and still don't see) anything in debug log tab. That's why I've said:
--- Quote ---"Is the debuger's log now displayed in logs and others on build log tab instead of the regular one? if so that's the log if not I do not now where is it saved as there seems to be no path specified:"
--- End quote ---
And that's why I've pasted the only thing I've had (after I've checked everywhere I thought, and didn't find what may look like the exact thing), but I've explained why I'm doing this, didn't I? I'm not trying in any way to waste your or others time but sometimes problems will not get sort in one post or two. I hope that's obvious for all of us. Or not? Because if not then according to neil's definition (not in so many words): Someone who can't solve problem withing 2 posts obviously is a troll, then yes! I am a fully fledged troll. But if we agree that some of the problems may take longer to solve than those two posts then I'm just an user who started using this IDE and most of the things are not obvious to me and the only thing I'm trying to do is to get help. Not trolling, not wasting anyone's time. Couldn't stress it hard enough.
Ok let's go back to my problem:
1. Following jane's advice I've set linker and compiler to same values:
a) both set to g++, result: code compiles, but still in a watch window I cannot see value of string obj
b) both set to mingw32-g++, result: code compiles, but still in a watch window I cannot see value of string obj.
I think that's the log you were talking about(sorry for the misunderstandings - just didn't see this tab):
--- Code: ---PATH=.;C:\QtSDK\Desktop\Qt\4.7.4\mingw\lib;C:\MinGW32\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\Universal Extractor;C:\Program Files\Universal Extractor\bin;D:\Libraries\boost_1_47_0\boost_1_47_0\build\bin;D:\Libraries\boost_1_47_0\boost_1_47_0\;C:\Program Files\TortoiseSVN\bin;C:\Qt\4.8.0\bin;D:\downloads\zip-2.3-3-bin\bin;C:\MinGW\bin;C:\Program Files\VisualSVN\bin
Command-line: C:\MinGW32\bin\gdb.exe -nx -fullname -quiet -args C:/excercizes/QT_projects/7500/bin/Debug/7500.exe
Working dir : C:\excercizes\QT_projects\7500
> set prompt >>>>>>cb_gdb:
Reading symbols from c:\excercizes\qt_projects\7500\bin\debug\7500.exe...done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.3
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set print elements -1
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Function "__cxa_throw" not defined.
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source E:\downloads\codeblocks\Nightly\oct_2011\CB_20111030_rev7550_DEBUGGER_BRANCH_win32\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/excercizes/QT_projects/7500/
>>>>>>cb_gdb:
> break "C:/excercizes/QT_projects/7500/main.cpp:7"
Breakpoint 2 at 0x4013cf: file C:\excercizes\QT_projects\7500\main.cpp, line 7.
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 52.0x980]
Breakpoint 2, main (argc=1, argv=0x340ec0) at C:\excercizes\QT_projects\7500\main.cpp:7
c:\excercizes\qt_projects\7500\main.cpp:7:133:beg:0x4013cf
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> quit
--- End code ---
Anyone have an idea how to solve it?
Thanks.
oBFusCATed:
Yes, this is the log, but where is no watch evaluation there.
So, after you stop on a breakpoint you should add a watch, both to a string and to an int variable and then paste the log again.
Also you can try to disable the option "Enable watch scripts", it is in the debugger option. And paste the output from the debugger again.
Jenna:
And don't forget to have the watches-window open !
smallB:
@obfuscated when you talk about int variable I assumed that you refer to 'argc' variable from args list of main. Hope that's the right assumption.
Ok, here is the log (by the way, after disabling "Enable watch scripts") I can see value of int and string (at last!). One extra thing only is that with string obj in order to see its value I have to expand the tree little (see the pic http://imageshack.us/photo/my-images/231/expandingtree.png/). Is there a way to see this value without expanding it or is this normal behavior (I don't mind expanding it just want to know if there is a way to ease this little bit):
--- Code: ---PATH=.;C:\QtSDK\Desktop\Qt\4.7.4\mingw\lib;C:\MinGW32\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\Universal Extractor;C:\Program Files\Universal Extractor\bin;D:\Libraries\boost_1_47_0\boost_1_47_0\build\bin;D:\Libraries\boost_1_47_0\boost_1_47_0\;C:\Program Files\TortoiseSVN\bin;C:\Qt\4.8.0\bin;D:\downloads\zip-2.3-3-bin\bin;C:\MinGW\bin;C:\Program Files\VisualSVN\bin
Command-line: C:\MinGW32\bin\gdb.exe -nx -fullname -quiet -args C:/excercizes/QT_projects/7500/bin/Debug/7500.exe
Working dir : C:\excercizes\QT_projects\7500
> set prompt >>>>>>cb_gdb:
Skip initializing the scripting!
Reading symbols from c:\excercizes\qt_projects\7500\bin\debug\7500.exe...done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.3
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set print elements -1
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Function "__cxa_throw" not defined.
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> directory C:/excercizes/QT_projects/7500/
>>>>>>cb_gdb:
> break "C:/excercizes/QT_projects/7500/main.cpp:7"
Breakpoint 2 at 0x4013cf: file C:\excercizes\QT_projects\7500\main.cpp, line 7.
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 4608.0x1540]
Breakpoint 2, main (argc=1, argv=0x4f0ec0) at C:\excercizes\QT_projects\7500\main.cpp:7
c:\excercizes\qt_projects\7500\main.cpp:7:133:beg:0x4013cf
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> whatis foo
type = std::string
>>>>>>cb_gdb:
> output foo
{static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x4f0eec "1234567avavav"}}>>>>>>cb_gdb:
> whatis argc
type = int
>>>>>>cb_gdb:
> output argc
1>>>>>>cb_gdb:
> quit
--- End code ---
By the way, I do want to thank you obfuscated for helping me with this problem. Most appreciated. Especially that I really do like cb more and more and it was upsetting me that I wouldn't be able to use it for debugging and will have to use vs. Luckily things aren't as bad as I thought. Thanks.
ollydbg:
@smallB
You can show the contents of "std::string" by using gdb's pretty printer, have a look at:GDB - qp-gcc - QP's GCC/MinGW32 Builds - Google Project Hosting
This wiki was created by me some months ago. :D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version