Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311807

Summary: gdb invoked from cdt crashes when the path to the project is long enough
Product: [Tools] CDT Reporter: David Komanek <komanek>
Component: cdt-debugAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: elaskavaia.cdt, komanek, pawel.1.piech
Version: 6.0.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description David Komanek CLA 2010-05-05 18:52:56 EDT
Build Identifier: M20100211-1343

gdb debugger does not work from cdt when the project path in the filesystem is long enough. gdb failt with and gdb.exe.stackdump:

Exception: STATUS_ACCESS_VIOLATION at eip=77128718
eax=00007FFE ebx=00000000 ecx=021A0016 edx=009C1746 esi=00000000 edi=7EFDDC00
ebp=0027BA64 esp=0027B78C program=C:\cygwin\bin\gdb.exe, pid 5512, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame     Function  Args
0027BA64  77128718  (7EFDDC00, 00000000, 0027BAA4, 00000000)
0027BCF8  77128C2D  (006D9950, 0027BD40, 00000060, 00000001)
0027C1C8  00461CC6  (00000000, 00000000, 105B8BC0, 004613DB)
0027C218  004136CB  (00461C50, 00000000, 0064D968, 00000006)
0027C2A8  004637F2 

If I delete the project and move its directory to the root of a disk drive and import it back, everything works fine, probably because the file paths are shorter (there are no spaces nor nationak characters in my project path, it seems to me to be related to the lenght of the path only)

Reproducible: Always

Steps to Reproduce:
1. create a C++ project deep in the directory structure
2. compile with cygwin
3. debug with gdb
Comment 1 David Komanek CLA 2010-05-05 19:04:38 EDT
Probably the same experience by another user:
http://www.eclipse.org/forums/index.php?t=tree&th=164529&#page_top
Comment 2 David Komanek CLA 2010-05-05 19:26:01 EDT
some more hints:
- there is a possibility it does not depend on the length of the pathm but on the number of cerain characters in the path (backslash, underscore ?
- it seems to be related to Windows Vista - this problem occurs on my Windows Vista 64bit, but I am not experiencing this with Windows 7 64bit
Comment 3 Elena Laskavaia CLA 2010-05-05 20:48:35 EDT
If gdb crashes why you sending bug to cdt? Should be gdb bug.
Comment 4 David Komanek CLA 2010-05-06 02:41:17 EDT
Because if I invoke it manually it works fine, but if it is called from Eclipse (debugging the same executable), it does not work well. It is somehow dependent on the path to the Eclipse project in the filesystem, so I suppose, there are some parameters or environment values passed from cdt to the debugger which are causing it. I agree that gdb should give a well formulated response to this, but at least there is a difference using gdb from cdt or by manual invocation.
Comment 5 Elena Laskavaia CLA 2010-05-06 10:42:23 EDT
You can post debug console here (Enable vebose console mode in the Debug tab
and post gdb console).
But if app is crashing is it app problem - no matter how "incorrect" are arguments are it should not crash.
Comment 6 David Komanek CLA 2010-05-11 19:23:57 EDT
I´m sorry, I don´t see such an option. Hopefully, someone smarter than me will be able to reproduce this and point the gdb community. Since I have the workaround by moving the project directory to a shorter filesystem path, I can live with it.

Thank you for your assistance.