User forums > Nightly builds

The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.

<< < (7/12) > >>

oBFusCATed:
The one you've added manually, for stl-views you can't do anything :)

Also if you want to use the python printers you should disable the 'Enable watch scripts' option.

renega_666:

--- Quote ---The one you've added manually, for stl-views you can't do anything Smiley

Also if you want to use the python printers you should disable the 'Enable watch scripts' option.
--- End quote ---

That's it! Pasing error disappear if I uncheck the 'Enable watch script'! :) But why did it work with the previous nightly (without the check box unchecked)?

Do you still want I to remove those commands? (I guess I would have to check the 'Enable watch script' then?)

oBFusCATed:
Yes, remove the scripts and enable the option for watch scripts.

renega_666:
So I removed the script commands and checked the 'Enable wtach scripts' and the bug appears again

Here is the log:


--- Quote ---Building to ensure sources are up-to-date
Selecting target:
Debug-Win32
Adding source dir: D:\Projects\Codeblocks\TestBugGDBParser\
Adding source dir: D:\Projects\Codeblocks\TestBugGDBParser\
Adding file: D:\Projects\Codeblocks\TestBugGDBParser\bin\Debug\TestBugGDBParser.exe
Changing directory to: D:/Projects/Codeblocks/TestBugGDBParser/.

[debug]PATH=.;C:\MinGW32\bin;D:\Perl\site\bin;D:\Perl\bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files\Autodesk\Backburner\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\doxygen\bin;C:\swig;C:\Program Files\TortoiseSVN\bin;D:\Program Files\doxygen\bin;D:\Program Files\CMake 2.8\bin;D:\QtSDK\Qt\4.8.0\bin;%APPDATA%\Python\Scripts;C:\MinGW32\bin
[debug]Command-line: C:\MinGW32\bin\gdb.exe -nx -fullname  -quiet -args D:/Projects/Codeblocks/TestBugGDBParser/bin/Debug/TestBugGDBParser.exe
[debug]Working dir : D:\Projects\Codeblocks\TestBugGDBParser

Starting debugger: C:\MinGW32\bin\gdb.exe -nx -fullname  -quiet -args D:/Projects/Codeblocks/TestBugGDBParser/bin/Debug/TestBugGDBParser.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 D:\Projects\Codeblocks\TestBugGDBParser\bin\Debug\TestBugGDBParser.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.4.50.20120119-cvs
[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 "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.4.50.20120119-cvs

[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 debugevents on
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source D:\Codeblocks_New\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory D:/Projects/Codeblocks/TestBugGDBParser/
[debug]>>>>>>cb_gdb:
[debug]> break "D:/Projects/Codeblocks/TestBugGDBParser/main.cpp:21"
[debug]Breakpoint 2 at 0x401452: file D:\Projects\Codeblocks\TestBugGDBParser\main.cpp, line 21.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]gdb: windows_init_thread_list

Child process PID: 7652

[debug][New Thread 7652.0x267c]
[debug]Breakpoint 2, main () at D:\Projects\Codeblocks\TestBugGDBParser\main.cpp:21
[debug]D:\Projects\Codeblocks\TestBugGDBParser\main.cpp:21:388:beg:0x401452
[debug]>>>>>>cb_gdb:

At D:\Projects\Codeblocks\TestBugGDBParser\main.cpp:21

[debug]> set debugevents off
[debug]>>>>>>cb_gdb:
[debug]> whatis str
[debug]type = String
[debug]>>>>>>cb_gdb:
[debug]> output str
[debug]{
[debug]  static npos = <optimized out>,
[debug]  _M_dataplus = {
[debug]    <std::allocator<char>> = {
[debug]      <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug]    members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug]    _M_p = 0x892ccc "My string"
[debug]  }
[debug]}>>>>>>cb_gdb:
[debug]> whatis foo
[debug]type = Foo
[debug]>>>>>>cb_gdb:
[debug]> output foo
[debug]{
[debug]  mName = {
[debug]    static npos = <optimized out>,
[debug]    _M_dataplus = {
[debug]      <std::allocator<char>> = {
[debug]        <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug]      members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug]      _M_p = 0x892c9c "MyFoo"
[debug]    }
[debug]  },
[debug]  mBar = 0
[debug]}>>>>>>cb_gdb:

--- End quote ---

ollydbg:
Hi, renega_666, I just read all your posts on the thread.

There are currently two method of show a std::string value under C::B.

1,
Use a python enabled gdb.
Disable the script (Uncheck the "Enable watch scripts") in the debugger setting dialog.
Adding some custom scripts to load python pretty printers when gdb started.
(I use: "source $(TARGET_COMPILER_DIR)bin\stl.gdb" for c++ stl library and "source $(TARGET_COMPILER_DIR)bin\wx.gdb" for wxWidgts library).
Note: You should have pretty printer scripts folders under your MinGw/bin folder.

2,
Use a normal gdb (whether it was python enabled or not).
Enable the script (Check the "Enable watch scripts") in the debugger setting dialog.
Do not add any custom loading python scripts.

I just test the method 1, and it works OK.
When I test method 2, the watch window shows that: Parsing GDB output failed for 'str'!
I'm using this debugger branch nighty build, and windows XP, the gdb was my personal build version: GNU gdb (GDB) 7.4.50.20120128-cvs
The related failed log:

--- Code: ---[debug]>>>>>>cb_gdb:
[debug]> whatis str
[debug]type = String
[debug]>>>>>>cb_gdb:
[debug]> output str
[debug]{
[debug]  static npos = 4294967295
[debug],
[debug]  _M_dataplus = {
[debug]    <std::allocator<char>> = {
[debug]      <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug]    members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug]    _M_p = 0x3f3d5c "My string"
[debug]  }
[debug]}>>>>>>cb_gdb:
[debug]> whatis foo
[debug]type = Foo
[debug]>>>>>>cb_gdb:
[debug]> output foo
[debug]{
[debug]  mName = {
[debug]    static npos = 4294967295,
[debug]    _M_dataplus = {
[debug]      <std::allocator<char>> = {
[debug]        <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug]      members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug]      _M_p = 0x3f3d2c "MyFoo"
[debug]    }
[debug]  },
[debug]  mBar = 0
[debug]}>>>>>>cb_gdb:

--- End code ---

So, either the new gdb has different output string than some old gdb version(like the official gdb7.3.1) Or there are some parsing errors.

To me, I suggest you use the method 1, because it is much better and powerful.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version