This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | On Windows Attach doesn't work | ||
---|---|---|---|
Product: | cnd | Reporter: | soldatov <soldatov> |
Component: | Debugger | Assignee: | Maria Tishkova <mromashova> |
Status: | NEW --- | ||
Severity: | normal | CC: | apepin |
Priority: | P2 | Keywords: | RELNOTE |
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
soldatov
2015-10-21 12:02:26 UTC
Code: #include <stdio.h> #include <unistd.h> int main(int argc, char** argv) { for (int i = 0; i < 100; i++) { printf("%d\n", i); sleep(1); } return 0; } I could not attach to the running program using the code here on Windows with DDD and gdb but it doesn't work. So it doesn't look like a problem with NetBeans but like a problem with GDB. Need more investigation Workaround on Windows + Cygwin64 I can attach debugger if I do such steps: - run sample in IDE - call Attach wizard, select process, select project and push OK button - set line breakpoint on 'printf' or 'sleep' line - Push Window|Debugging|Debugger Console - type where and press Enter ==> strange stack #0 0x00000000778fafb1 in ntdll!DbgBreakPoint () from /cygdrive/c/windows/SYSTEM32/ntdll.dll #1 0x00000000779a2e08 in ntdll!DbgUiRemoteBreakin () from /cygdrive/c/windows/SYSTEM32/ntdll.dll #2 0x00000000776a59cd in KERNEL32!BaseThreadInitThunk () from /cygdrive/c/windows/system32/kernel32.dll #3 0x00000000778da561 in ntdll!RtlUserThreadStart () from /cygdrive/c/windows/SYSTEM32/ntdll.dll #4 0x0000000000000000 in ?? () - type 'c' and press Enter - type 'where' again and press Enter ==> good stack #0 main (argc=1, argv=0xffffcc60) at main.cpp:6 - type 'n' and press Enter ==> Debugger GUI appears and I can debug sample via NetBeans |