From: SF/projects/mingw n. l. <min...@li...> - 2012-07-11 21:38:16
|
Bugs item #3542086, was opened at 2012-07-10 10:13 Message generated for change (Settings changed) made by jerstlouis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3542086&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: gdb >Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jerome St-Louis (jerstlouis) Assigned to: Nobody/Anonymous (nobody) Summary: Stepping over GL function brings to bad line/file Initial Comment: When stepping over a call to glFramebufferTexture2D, GDB ends up at a totally unrelated location. This only happens when a valid GL context is active. Testing on a eVGA nVidia GeForce 570 GTX HD, with drivers v.301.42, although it happened on many other driver versions. Not sure if this happens with non-nVidia cards. This problem started happening from GCC 7.2. Tested with various MinGW GDB / GCC combinations: Ran into problems mixing various GDB/GCC versions, where breakpoints won't even hit (Testing through Ecere IDE GDB integration). GDB 7.1 does not seem to hit any breakpoint. Here's the full table of results: gdb 6.8 + gcc 4.4.0: works fine gdb 6.8 + gcc 4.6.2: breakpoints doesn't even hit gdb 7.0 + gcc 4.4.0: works fine gdb 7.0 + gcc 4.6.2: works fine gdb 7.1 + gcc 4.4.0: breakpoints doesn't even hit gdb 7.1 + gcc 4.6.2: breakpoints doesn't even hit gdb 7.2 + gcc 4.6.2: broken (stepping over brings to bad line) gdb 7.2 + gcc 4.4.0: broken (stepping over brings to bad line) gdb 7.3 + gcc 4.6.2: broken (stepping over brings to bad line) gdb 7.3 + gcc 4.4.0: broken (stepping over brings to bad line) gdb 7.4 + gcc 4.4.0: broken (stepping over brings to bad line) gdb 7.4 + gcc 4.6.2: broken (stepping over brings to bad line) This bug report supersedes #3304426 where I was saying gdb 6.8 doesn't work with GCC 4.5.0+ I'll be sticking with GDB 7.0 (which luckily works with newer GCCs) until this is resolved. See sample attached code which demonstrates the problem (using Ecere ( http://ecere.com/ ) to set up the OpenGL context and GLee ( http://elf-stone.com/getfile.php?title=GleeSrcTar ) to resolve glFramebufferTexture2D). Please use your favorite way to set up an OpenGL context if you don't wish to install Ecere . You put a breakpoint on line 15, hit F10 (Step Over), and you end up with this call stack: 0 inside ??, C:\Windows\SysWOW64\nvoglv32.dll 1 inside __ecereMethod___ecereNameSpace__ecere__gui__Window_LoadGraphics, C:\Program Files (x86)\ECERE SDK\bin\ecere.dll 2 inside __ecereMethod___ecereNameSpace__ecere__gui__Window_Create, C:\Program Files (x86)\ECERE SDK\bin\ecere.dll 3 inside __ecereMethod___ecereNameSpace__ecere__gui__GuiApplication_Main, C:\Program Files (x86)\ECERE SDK\bin\ecere.dll 4 WinMain Function, obj\debug.win32\gdbGLTest.main.ec:101 Thanks! -Jerome ---------------------------------------------------------------------- Comment By: Jerome St-Louis (jerstlouis) Date: 2012-07-10 12:23 Message: Hi Earnie. Thanks for getting back to me quickly! All my code is compiled with debug information and no optimization. As we discussed before, -O0 is default for GCC. I'm specifying -g, and no -O. I can place breakpoints and step over most function calls in my code. I can even step over other OpenGL calls fine. glFramebufferTexture2D in particular is problematic with 7.1+, but works with 7.0 There might have been other few specific calls over which I had trouble, I can't recall. Regards, Jerome ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2012-07-10 12:05 Message: Are your libraries and programs you want to debug compiled without optimization, -O0 with GCC/G++? If not, what you describe is a direct result of optimization. ---------------------------------------------------------------------- Comment By: Jerome St-Louis (jerstlouis) Date: 2012-07-10 10:15 Message: Sorry it should read "This problem started happening from ***GDB*** 7.2". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3542086&group_id=2435 |