User forums > Using Code::Blocks

Problem with Debugger when upgrading MinGW

<< < (2/9) > >>

recobb:

--- Quote from: oBFusCATed on February 10, 2011, 11:03:26 pm ---Read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

And enable full logging. Then verify that c::b executes the correct commands (-g should be used everywhere).

--- End quote ---

Thanks for the reply.  I already had logging enabled:

--- Code: ----------------- Clean: Debug in wxRCPlot DataObject ---------------

Cleaned "wxRCPlot DataObject - Debug"

-------------- Build: Debug in wxRCPlot DataObject ---------------

mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\AboutDialog.cpp -o winobj\Debug\AboutDialog.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\AutoscaleAsk.cpp -o winobj\Debug\AutoscaleAsk.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\CursorWin.cpp -o winobj\Debug\CursorWin.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\DataDialog_2.cpp -o winobj\Debug\DataDialog_2.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\PolarDialog.cpp -o winobj\Debug\PolarDialog.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\RCScale.cpp -o winobj\Debug\RCScale.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\Resolution.cpp -o winobj\Debug\Resolution.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\Summary.cpp -o winobj\Debug\Summary.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\TitleAxis.cpp -o winobj\Debug\TitleAxis.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\WriteASCII.cpp -o winobj\Debug\WriteASCII.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp -o winobj\Debug\dataclass.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\wxrcgwin.cpp -o winobj\Debug\wxrcgwin.o
mingw32-g++.exe -Wall -pipe -mthreads  -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -g  -Wall -g   -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswu  -c E:\Analysis\wxproj\wxrcplot_data\wxrcplot.cpp -o winobj\Debug\wxrcplot.o
windres.exe -i E:\Analysis\wxproj\WXRCPL~2\wxrcplot.rc -J rc -o winobj\Debug\wxrcplot.res -O coff -IC:\wxWidgets\include -IC:\wxWidgets\lib\gcc_dll\mswu
mingw32-g++.exe -LC:\wxWidgets\lib\gcc_dll  -o bin\Debug\wxRCPlotD.exe winobj\Debug\AboutDialog.o winobj\Debug\AutoscaleAsk.o winobj\Debug\CursorWin.o winobj\Debug\DataDialog_2.o winobj\Debug\PolarDialog.o winobj\Debug\RCScale.o winobj\Debug\Resolution.o winobj\Debug\Summary.o winobj\Debug\TitleAxis.o winobj\Debug\WriteASCII.o winobj\Debug\dataclass.o winobj\Debug\wxrcgwin.o winobj\Debug\wxrcplot.o  winobj\Debug\wxrcplot.res  -mthreads -lm  -lwxmsw28u -lm -lm  -mwindows
Output size is 3.33 MB
Process terminated with status 0 (0 minutes, 20 seconds)
0 errors, 0 warnings (0 minutes, 20 seconds)

--- End code ---
All files have the -g flag, which makes sense, because I can inspect a variable if I set a watch on it, and set breakpoints anywhere.  The problem is that I cannot single step.

Here is the debugger log output - I started the program and it ran to a breakpoint I had set.  Then I tried twice to single step (Next Line - F7), and both times I received the Acessing Memory Error:


--- Code: ---> run
gdb: windows_init_thread_list
[New Thread 4204.0x7e8]
[New Thread 4204.0xa84]
[New Thread 4204.0x938]
[New Thread 4204.0xbb4]
[New Thread 4204.0x424]
Error while mapping shared library sections:
C:\WINDOWS\SysWOW64\ntdll32.dll: No such file or directory.
Breakpoint 3, DataClass::GetSetRanges (this=0x50b940, setnum=0, xmin=0x22f10c, xmax=0x22f104, ymin=0x22f0fc, ymax=0x22f0f4) at E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp:239
E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp:239:6645:beg:0x420800
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> info locals
No locals.
>>>>>>cb_gdb:
> info args
this = 0x50b940
setnum = 0
xmin = 0x22f10c
xmax = 0x22f104
ymin = 0x22f0fc
ymax = 0x22f0f4
>>>>>>cb_gdb:
> whatis maxminset
type = bool
>>>>>>cb_gdb:
> output maxminset
true>>>>>>cb_gdb:
> whatis *ymin
type = double
>>>>>>cb_gdb:
> output *ymin
5.92547884595646e+268>>>>>>cb_gdb:
> next
Warning:
Cannot insert breakpoint -132.
Error accessing memory address 0x7816cd30: Input/output error.
Cannot insert breakpoint -131.
Error accessing memory address 0x78594458: Input/output error.
0x00420805 in DataClass::GetSetRanges (this=0x50b940, setnum=0, xmin=0x22f10c, xmax=0x22f104, ymin=0x22f0fc, ymax=0x22f0f4) at E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp:239
E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp:239:6645:beg:0x420805
>>>>>>cb_gdb:
> info locals
No locals.
>>>>>>cb_gdb:
> info args
this = 0x50b940
setnum = 0
xmin = 0x22f10c
xmax = 0x22f104
ymin = 0x22f0fc
ymax = 0x22f0f4
>>>>>>cb_gdb:
> whatis maxminset
type = bool
>>>>>>cb_gdb:
> output maxminset
true>>>>>>cb_gdb:
> whatis *ymin
type = double
>>>>>>cb_gdb:
> output *ymin
5.92547884595646e+268>>>>>>cb_gdb:
> next
Warning:
Cannot insert breakpoint -137.
Error accessing memory address 0x7816cd30: Input/output error.
Cannot insert breakpoint -136.
Error accessing memory address 0x78594458: Input/output error.
>>>>>>cb_gdb:
> whatis rcMouseClip
type = wxRect
>>>>>>cb_gdb:
> output &rcMouseClip
(wxRect *) 0x50b410>>>>>>cb_gdb:
> output rcMouseClip
{
  x = 0,
  y = 0,
  width = 0,
  height = 0
}>>>>>>cb_gdb:

--- End code ---

I can follow some of that, but not all.  Looking at the error:
C:\WINDOWS\SysWOW64\ntdll32.dll: No such file or directory

I verified that that file is not on my system (64-bit XP) - could that be the problem?  I have an ntdll.dll in my Windows/system32 folder, but no ntdll32.dll anywhere.

stahta01:

--- Quote from: recobb on February 11, 2011, 12:29:53 am ---I can follow some of that, but not all.  Looking at the error:
C:\WINDOWS\SysWOW64\ntdll32.dll: No such file or directory

--- End quote ---

From http://cygwin.com/ml/cygwin/2007-10/msg00179.html

--- Quote ---Simply copying ntdll.dll to ntdll32.dll in SysWOW64 seems to make gdb "happy",
i.e., it no longer displays the message.  Gdb seems to incorrectly "determine"
that the name of the .dll should have "32" appended to it.  That may be
correct for other .dlls, but not this one.

--- End quote ---

Use at your own risk; the above is just goggle info. I have no idea if it is right; but, it makes sense.

Tim S.

oBFusCATed:
recobb:
Can you post the top of the debugger's log?
The lines with the version info?

p.s. please use code tags for long/any pastes... (if you have the time edit your post, so it utilizes them)

recobb:

--- Quote from: oBFusCATed on February 11, 2011, 12:50:06 am ---recobb:
Can you post the top of the debugger's log?
The lines with the version info?

p.s. please use code tags for long/any pastes... (if you have the time edit your post, so it utilizes them)

--- End quote ---

Sorry about the code tags - I'd been looking for something to use and missed that, ended up using teletype instead...

Here's the entire log from startup to the breakpoint and then two attempts to single step:


--- Code: ---PATH=.;C:\wxWidgets\lib\gcc_dll;C:\MinGW32\bin;c:\program files (x86)\php\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;c:\util;c:\program files (x86)\common files\acronis\snapapi\;c:\program files (x86)\quicktime\qtsystem\;C:\Program Files (x86)\MATLAB\R2006b\bin;C:\Program Files (x86)\MATLAB\R2006b\bin\win32;C:\Program Files (x86)\ActivIdentity\ActivClient\;C:\BC5\BIN;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\
Command-line: C:\MinGW32\bin\gdb.exe -nx -fullname  -quiet -args bin/Debug/wxRCPlotD.exe
Working dir : E:\Analysis\wxproj\wxrcplot_data\
> set prompt >>>>>>cb_gdb:
Reading symbols from E:\Analysis\wxproj\wxrcplot_data/bin/Debug/wxRCPlotD.exe...done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.1
Copyright (C) 2010 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 debugevents on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source C:\CodeBlocksNightly\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory E:/Analysis/wxproj/wxrcplot_data/
>>>>>>cb_gdb:
> break "E:/Analysis/wxproj/wxrcplot_data/dataclass.cpp:239"
Breakpoint 2 at 0x420800: file E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp, line 239.
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 4976.0x820]
[New Thread 4976.0x1348]
[New Thread 4976.0x1148]
[New Thread 4976.0xfe4]
[New Thread 4976.0x13bc]
Error while mapping shared library sections:
C:\WINDOWS\SysWOW64\ntdll32.dll: No such file or directory.
Breakpoint 2, DataClass::GetSetRanges (this=0x50b940, setnum=0, xmin=0x22f10c, xmax=0x22f104, ymin=0x22f0fc, ymax=0x22f0f4) at E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp:239
E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp:239:6645:beg:0x420800
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> info locals
No locals.
>>>>>>cb_gdb:
> info args
this = 0x50b940
setnum = 0
xmin = 0x22f10c
xmax = 0x22f104
ymin = 0x22f0fc
ymax = 0x22f0f4
>>>>>>cb_gdb:
> next
Warning:
Cannot insert breakpoint -132.
Error accessing memory address 0x7816cd30: Input/output error.
Cannot insert breakpoint -131.
Error accessing memory address 0x78594458: Input/output error.
0x00420805 in DataClass::GetSetRanges (this=0x50b940, setnum=0, xmin=0x22f10c, xmax=0x22f104, ymin=0x22f0fc, ymax=0x22f0f4) at E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp:239
E:\Analysis\wxproj\wxrcplot_data\dataclass.cpp:239:6645:beg:0x420805
>>>>>>cb_gdb:
> info locals
No locals.
>>>>>>cb_gdb:
> info args
this = 0x50b940
setnum = 0
xmin = 0x22f10c
xmax = 0x22f104
ymin = 0x22f0fc
ymax = 0x22f0f4
>>>>>>cb_gdb:
> next
Warning:
Cannot insert breakpoint -137.
Error accessing memory address 0x7816cd30: Input/output error.
Cannot insert breakpoint -136.
Error accessing memory address 0x78594458: Input/output error.
>>>>>>cb_gdb:

--- End code ---

ollydbg:

--- Quote ---PATH=.;C:\wxWidgets\lib\gcc_dll;C:\MinGW32\bin;c:\program files (x86)\php\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;c:\util;c:\program files (x86)\common files\acronis\snapapi\;c:\program files (x86)\quicktime\qtsystem\;C:\Program Files (x86)\MATLAB\R2006b\bin;C:\Program Files (x86)\MATLAB\R2006b\bin\win32;C:\Program Files (x86)\ActivIdentity\ActivClient\;C:\BC5\BIN;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;C:\Program Files (x86)\IDM Computer Solutions\UltraCompare\

--- End quote ---

from the error:

--- Quote ---Error while mapping shared library sections:
C:\WINDOWS\SysWOW64\ntdll32.dll: No such file or directory.

--- End quote ---

it seems the path:
C:\WINDOWS\SysWOW64\ was not in PATH environment variable.

And you could try a recent mingw gcc and gdb (gcc 4.5.3 snapshot, gdb 2011xxx), see here:
http://pcxprj.googlecode.com/files/MinGW_win32_gcc4.5.3static_snapshots.7z
To test it whether the bug was fixed. :D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version