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: | Is it possible to debug c++ remotely at all? | ||
---|---|---|---|
Product: | cnd | Reporter: | puchuu |
Component: | Debugger | Assignee: | Maria Tishkova <mromashova> |
Status: | NEW --- | ||
Severity: | normal | CC: | apepin, slonik |
Priority: | P4 | ||
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
puchuu
2011-05-02 21:48:50 UTC
Founded netbeans's plugin GdbServer which don't work too! 1) Debug -> Attach Debugger http://clip2net.com/clip/m46295/1304435354-clip-52kb.png 2) Hangs. cannot connect even with root privileges http://clip2net.com/clip/m46295/1304435766-clip-11kb.jpg without any log of cource What is a sense of this plugin? nohup gdbserver ip:port --attach `cat /var/run/my_app.pid` > /var/log/my_app/log.txt 2> /var/log/my_app/error.txt < /dev/null & echo $! > /var/run/my_app_debug.pid any man who interested in remote debug can read man!! Don't make stupid plugins!! Minimum that allows debugging project with netbeans is very simple: implement attaching gdbserver! http://clip2net.com/clip/m46295/1304436072-clip-11kb.png suddenly found a log to the plugin GdbServer in uigestures <message>Cannot run program "/usr/bin/gdb" (in directory "F:\Debian_squeeze\shared\puchuupp"): CreateProcess error=2, ?? ??????? ????? ????????? ????</message> <exception> <message>java.lang.Exception: Cannot run program "/usr/bin/gdb" (in directory "F:\Debian_squeeze\shared\puchuupp"): CreateProcess error=2, ?? ??????? ????? ????????? ????</message> <frame> <class>org.netbeans.modules.cnd.debugger.common2.utils.ExecutorCND</class> <method>startEngine</method> <line>208</line> <file>${netBeansDir}modules/org-netbeans-modules-cnd-debugger-common2.jar</file> </frame> <frame> <class>org.netbeans.modules.cnd.debugger.gdb2.Gdb$Factory</class> <method>startAsync</method> <line>468</line> <file>${netBeansDir}modules/org-netbeans-modules-cnd-debugger-gdb2.jar</file> </frame> <frame> <class>org.netbeans.modules.cnd.debugger.gdb2.Gdb$Factory</class> <method>access$800</method> <line>172</line> <file>${netBeansDir}modules/org-netbeans-modules-cnd-debugger-gdb2.jar</file> </frame> <frame> <class>org.netbeans.modules.cnd.debugger.gdb2.Gdb$Factory$1</class> <method>run</method> <line>297</line> <file>${netBeansDir}modules/org-netbeans-modules-cnd-debugger-gdb2.jar</file> </frame> <frame> <class>org.openide.util.RequestProcessor$Task</class> <method>run</method> <line>1424</line> <file>${netbeans.home}lib/org-openide-util.jar</file> </frame> <frame> <class>org.openide.util.RequestProcessor$Processor</class> <method>run</method> <line>1968</line> <file>${netbeans.home}lib/org-openide-util.jar</file> </frame> </exception> you need to attach from local configuration okey I make this: 1) Select localhost as default developer host http://clip2net.com/clip/m46295/1304439089-clip-14kb.png 2) Press attach and ok - it connected successfully http://clip2net.com/clip/m46295/1304439170-clip-11kb.png 3) But it can't change directory http://clip2net.com/clip/m46295/1304439232-clip-13kb.jpg how to attach debugger without changing directory? you can have debugger console opened to see what gdb commands it executes (main menu/windows/debugging/debugger console). Most probably you need to set propper directory in project properties. Just a comment concerning zero files. In "Automatic copy" mode IDE copies files into a special place that isn't supposed to be used by user directly. Let me explain how "Automatic copying" works. Files are copied on demand - a special shared library that is preloaded when building, interposes all file related calls; so IDE copies a file just at the moment build tries to open it. The problem is that Linux does not allow to interpose stat() call. Because of that all files are first initialized by zeros (note that this won't waste disk space), to have directory structure in place. Zeroes in CMakeOutput.log means just that it wasn't open when building. (Or that there is a bug in this complex machinery I just described). But that's a matter of a different discussion, you can file a bug or discuss this via email... oh my god!!! inventing a wheel? I was sure that you use rsync!! rsync doesn't belongs to java way or what? The question for you is "why doesn't your complex super mega wheel work?" I am getting: {PATH_TO_PROJECT}: inappropriate ioctl for device. I am on win7, have a debian remote build host, cross compiling to arm target. I have correctly setup the gdb path in my build host. I can debug like this: dan@linuxbuilder:/usr/src/buildroot-at91/output/host/usr/bin$ arm-linux-gdb ~/9302/lw/ix_port GNU gdb (GDB) 7.4.1 Copyright (C) 2012 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 "--host=i686-pc-linux-gnu --target=arm-buildroot-linux-uclibcgnueabi". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/dan/9302/usr/local/bin/arm/linwax/ix_port...done. (gdb) target extended-remote 192.168.69.222:12345 Remote debugging using 192.168.69.222:12345 Note: breakpoint 1 also set at pc 0x961c. Breakpoint 2 at 0x961c (gdb) r Starting program: /home/dan/9302/usr/local/bin/arm/linwax/ix_port Running the default executable on the remote target failed; try "set remote exec-file"? (gdb) set remote exec-file /lw/ix_port (gdb) r Starting program: /home/dan/9302/usr/local/bin/arm/linwax/ix_port warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Cannot access memory at address 0x0 warning: `/lib/libpthread.so.0': Shared library architecture unknown is not compatible with target architecture arm. warning: Could not load shared library symbols for 6 libraries, e.g. /lw/ix_port. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? Breakpoint 1, gen_msg (msg=0xabc0 "IX_PORT -- No Command line given\n") at library/debug.c:328 328 if (my_slug != -1) (gdb) |