User forums > Using Code::Blocks
Problem with Debugger when upgrading MinGW
ollydbg:
I test your sample code again, and both file in project folder and other folder will cause memory access error, see the log below:
--- Quote ---> run
gdb: windows_init_thread_list
[New Thread 3612.0xe20]
[New Thread 3612.0xe28]
[New Thread 3612.0xe2c]
[New Thread 3612.0xe30]
[New Thread 3612.0xe34]
BFD: C:\WINDOWS\system32\WMVCore.dll: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section .reloc
[New Thread 3612.0xe38]
[New Thread 3612.0xe3c]
[New Thread 3612.0xe40]
[New Thread 3612.0xe44]
Breakpoint 2, DataClass::GetSetRanges (this=0x4224e0, setnum=0, xmin=0x23f7e4, xmax=0x23f7dc, ymin=0x23f7d4, ymax=0x23f7cc) at D:\gdb_error\dataclass.cpp:227
D:\gdb_error\dataclass.cpp:227:6357:beg:0x403bad
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> next
Warning:
Cannot insert breakpoint -411.
Error accessing memory address 0x7816cd30: Input/output error.
0x00403bb0 in DataClass::GetSetRanges (this=0x4224e0, setnum=0, xmin=0x23f7e4, xmax=0x23f7dc, ymin=0x23f7d4, ymax=0x23f7cc) at D:\gdb_error\dataclass.cpp:227
D:\gdb_error\dataclass.cpp:227:6357:beg:0x403bb0
>>>>>>cb_gdb:
> cont
[New Thread 3612.0x37c]
[New Thread 3612.0x3ac]
Breakpoint 2, DataClass::GetSetRanges (this=0x4224e0, setnum=0, xmin=0x23f7e4, xmax=0x23f7dc, ymin=0x23f7d4, ymax=0x23f7cc) at D:\gdb_error\dataclass.cpp:227
D:\gdb_error\dataclass.cpp:227:6357:beg:0x403bad
>>>>>>cb_gdb:
> next
Warning:
Cannot insert breakpoint -416.
Error accessing memory address 0x7816cd30: Input/output error.
0x00403bb0 in DataClass::GetSetRanges (this=0x4224e0, setnum=0, xmin=0x23f7e4, xmax=0x23f7dc, ymin=0x23f7d4, ymax=0x23f7cc) at D:\gdb_error\dataclass.cpp:227
D:\gdb_error\dataclass.cpp:227:6357:beg:0x403bb0
>>>>>>cb_gdb:
> next
Warning:
Cannot insert breakpoint -421.
Error accessing memory address 0x7816cd30: Input/output error.
>>>>>>cb_gdb:
--- End quote ---
Now, I'm using pcx's 4.5.3 package:
http://code.google.com/p/pcxprj/downloads/detail?name=MinGW_win32_gcc4.5.3static_snapshots.7z
using other packages:
tdm4.5.1 loaden4.4.5 pcx4.5.2, the first time I debug the program, I will see the memory access error, but the second time I debug, there is no such error.(I do not rebuild the target, I just press the debug button to start the debugger again)
I have totally disable my anti virus.
That was too strange.
recobb:
--- Quote from: ollydbg on February 15, 2011, 02:05:09 am ---I test your sample code again, and both file in project folder and other folder will cause memory access error, see the log below:
--- End quote ---
You don't know how happy that makes me, at this point, that someone else has been able to reproduce this damn error! :D
Do you have any suggestions for next step(s)?
ollydbg:
--- Quote from: recobb on February 15, 2011, 02:34:26 am ---Do you have any suggestions for next step(s)?
--- End quote ---
the "memory access" error happens randomly, so I don't know how to check it. Does it due to GCC or GDB????
recobb:
--- Quote from: ollydbg on February 15, 2011, 02:40:03 am ---
--- Quote from: recobb on February 15, 2011, 02:34:26 am ---Do you have any suggestions for next step(s)?
--- End quote ---
the "memory access" error happens randomly, so I don't know how to check it. Does it due to GCC or GDB????
--- End quote ---
So far, on my system, it has been dependent on the location of the data file (but, apparently not for you?). I do not have the problem when the data file is in the project directory, but when it is located in (possibly specific) other folders. Since it is the same code (already compiled with a given compiler) that has the problem in one location, but not another, I'm leaning towards thinking it is the debugger.
So far, the pattern on my system (3 different project files) is this:
-data file in parallel folder (up a level from the project file, then down a level into another folder) - the problem always occurs.
-data file in project folder -it usually works, although not always. But immediately running it again can change the result from the previous run
-data file in parent folder - fairly random
ollydbg:
--- Quote from: recobb on February 15, 2011, 03:02:10 am ----data file in project folder -it usually works, although not always. But immediately running it again can change the result from the previous run
--- End quote ---
I can definitely confirm this!!!
I guess the problem is in GDB. :D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version