| View previous topic :: View next topic |
| Author |
Message |
kristoferp
Joined: 15 Aug 2008 Posts: 11
|
Posted: Thu Aug 28, 2008 7:29 am Post subject: Attaching a running process |
|
|
Hi,
I'm having difficulties when I try to attach a running process in Ubuntu. I've set the "Build result" to point to my executable, but when ever I try to attach the debugger I get "The executable with the selected project does not match the selected processID". What am I doing wrong?
Cheers,
Kristofer |
|
| Back to top |
|
 |
Gordon Prieur Posted via mailing list.
|
Posted: Thu Aug 28, 2008 3:42 pm Post subject: Attaching a running process |
|
|
kristoferp wrote:
| Quote: | Hi,
I'm having difficulties when I try to attach a running process in Ubuntu. I've set the "Build result" to point to my executable, but when ever I try to attach the debugger I get "The executable with the selected project does not match the selected processID". What am I doing wrong?
|
I can't say without more information. Can you look in /tmp (possibly
/var/tmp) for
the most recent gdb-cmds*.log file (immediately after trying to attach)?
Verify the
time and date match the attempt you just made.
If the failure is before gdb is started, there won't be a log showing
the failure. If
this is the case, try running "netbeans -J-Dgdb.logger.level=FINE" and
send me
the messages.log file from your userdir (default is
~/.netbeans/<NB-version>/var/log/messages).
It would also help if you said what version of NetBeans you're running.
By the way,
when you selected the process, did you also select the matching project
at the bottom
of the attach panel? You need this because gdb requires sources to debug
and the only
way to tell netbeans' gdb module where they are is from the selected
project.
Thanks,
Gordon
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cnd.netbeans.org
For additional commands, e-mail: users-help@cnd.netbeans.org |
|
| Back to top |
|
 |
kristoferp
Joined: 15 Aug 2008 Posts: 11
|
Posted: Fri Sep 05, 2008 1:04 pm Post subject: Re: Attaching a running process |
|
|
Hi,
Trying with netbeans again.
| Gordon Prieur wrote: | kristoferp wrote:
I can't say without more information. Can you look in /tmp (possibly
/var/tmp) for
the most recent gdb-cmds*.log file (immediately after trying to attach)?
Verify the
time and date match the attempt you just made.
|
Found in gdb-cmds63509.log:
Debugger Command: [/usr/bin/gdb, --nw, --silent, --interpreter=mi]
Env[0]: []
workingDirectory: /home/thek/NetBeansProjects/bug38692/
================================================
100-gdb-version
101-environment-directory "/home/thek/NetBeansProjects/bug38692/"
102-gdb-show language
103-gdb-set print repeat 10
104attach 30270
100~"GNU gdb 6.8-debian\n"
100~"Copyright (C) 2008 Free Software Foundation, Inc.\n"
100~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
100~"This is free software: you are free to change and redistribute it.\n"
100~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n"
100~"and \"show warranty\" for details.\n"
100~"This GDB was configured as \"i486-linux-gnu\".\n"
100^done
101^done,source-path="/home/thek/NetBeansProjects/bug38692:$cdir:$cwd"
102^done,value="auto; currently c"
103^done
104&"attach 30270\n"
104~"Attaching to process 30270\n"
104~"Reading symbols from /home/thek/Development/cpp/mysqlbzr/mysql-5.1-bug38692/sql/mysqld..."
104~"done.\n"
104~"Reading symbols from /lib/tls/i686/cmov/libpthread.so.0..."
104~"done.\n"
104~"[Thread debugging using libthread_db enabled]\n"
104~"[New Thread 0xb7d2f6b0 (LWP 30270)]\n"
104~"[New Thread 0xb3698b90 (LWP 30279)]\n"
104~"[New Thread 0xb3e99b90 (LWP 30278)]\n"
104~"[New Thread 0xb489fb90 (LWP 30277)]\n"
104~"[New Thread 0xb50a0b90 (LWP 30276)]\n"
104~"[New Thread 0xb58a2b90 (LWP 30275)]\n"
104~"[New Thread 0xb60a3b90 (LWP 30274)]\n"
104~"[New Thread 0xb68a4b90 (LWP 30273)]\n"
104~"[New Thread 0xb7d2eb90 (LWP 30272)]\n"
104~"Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0\n"
104~"Reading symbols from /usr/lib/libz.so.1..."
<snip>
105info files
105&"info files\n"
105~"Symbols from \"/home/thek/Development/cpp/mysqlbzr/mysql-5.1-bug38692/sql/mysqld\".\n"
105~"Unix child process:\n"
105~"\tUsing the running image of attached LWP 30270.\n"
105~"\tWhile running this, GDB does not access memory from...\n"
105~"Local exec file:\n"
105~"\t`/home/thek/Development/cpp/mysqlbzr/mysql-5.1-bug38692/sql/mysqld', \n"
105~" file type elf32-i386.\n"
105~"\tEntry point: 0x819c5d0\t0x08048134 - 0x08048147 is .interp\n"
105~"\t0x08048148 - 0x08048168 is .note.ABI-tag\n"
105~"\t0x08048168 - 0x0806c400 is .hash\n"
105~"\t0x0806c400 - 0x08094290 is .gnu.hash\n"
105~"\t0x08094290 - 0x080e4b20 is .dynsym\n"
105~"\t0x080e4b20 - 0x08190095 is .dynstr\n"
105~"\t0x08190096 - 0x0819a1a8 is .gnu.version\n"
<snip>
The C/C++ project is created from existing source, so the code is not in the "workingDirectory". Could this be an issue?
Also, I did make sure that the correct project was selected in the drop-down list.
/Kristofer |
|
| Back to top |
|
 |
kristoferp
Joined: 15 Aug 2008 Posts: 11
|
Posted: Thu Sep 25, 2008 4:02 pm Post subject: Re: Attaching a running process |
|
|
| kristoferp wrote: | Hi,
Trying with netbeans again.
/Kristofer |
I'm still having issues with this? I need help to understand what I'm doing wrong if this indeed isn't a bug. You may call me fool or stupid if it helps.
 |
|
| Back to top |
|
 |
Leonid Lenyashin Posted via mailing list.
|
Posted: Thu Sep 25, 2008 4:04 pm Post subject: Attaching a running process |
|
|
You're providing so little information that it is difficult to help. For
sure there is no known bug like what you see.
kristoferp wrote:
| Quote: | kristoferp wrote:
| Quote: | Trying with netbeans again. :-)
|
I'm still having issues with this? I need help to understand what I'm doing wrong if this indeed isn't a bug. You may call me fool or stupid if it helps.
[Rolling Eyes]
|
|
|
| Back to top |
|
 |
kristoferp
Joined: 15 Aug 2008 Posts: 11
|
Posted: Thu Sep 25, 2008 4:15 pm Post subject: Re: Attaching a running process |
|
|
| Leonid Lenyashin wrote: | You're providing so little information that it is difficult to help. For
sure there is no known bug like what you see.
|
Alright! I thought I had provided the information that was asked for. What else do I need to supply?
/Kristofer |
|
| Back to top |
|
 |
Leonid Lenyashin Posted via mailing list.
|
Posted: Thu Sep 25, 2008 4:22 pm Post subject: Attaching a running process |
|
|
You meant this:
| Quote: | I'm having difficulties when I try to attach a running process in Ubuntu. I've set the "Build result" to point to my executable, but when ever I try to attach the debugger I get "The executable with the selected project does not match the selected processID". What am I doing wrong?
| I think you should file a bug against cnd/gdb and then the assigned
engineer will ask more specific questions (if any).
kristoferp wrote:
| Quote: | Leonid Lenyashin wrote:
| Quote: | You're providing so little information that it is difficult to help. For
|
| Quote: | sure there is no known bug like what you see.
|
Alright! I thought I had provided the information that was asked for. What else do I need to supply?
/Kristofer
|
|
|
| Back to top |
|
 |
kristoferp
Joined: 15 Aug 2008 Posts: 11
|
Posted: Tue Nov 18, 2008 4:08 pm Post subject: Re: Attaching a running process |
|
|
Update: If I don't set the "Run Directory"-property and at the same time don't forget to set the "Build result directory"-property it would appear I'm able to attach running processes. |
|
| Back to top |
|
 |
hacya
Joined: 02 Jul 2009 Posts: 1
|
Posted: Thu Jul 02, 2009 2:35 am Post subject: |
|
|
I found the root problem on this topic.
If the path in the settings contains any symbolic link path, Nebeans is unable to attach the process. I mean when '/bin/pwd' doesn't match 'echo $PWD'. To avoid the problem, the path must be set based on the path returned from '/bin/pwd'. Otherwise, Netbeans fails to attach, even on Nebeans 6.7. |
|
| Back to top |
|
 |
Egor Ushakov Posted via mailing list.
|
Posted: Fri Jul 03, 2009 4:15 pm Post subject: Attaching a running process |
|
|
Can you please file a bug with the testcase,
I'm sure it can be fixed quickly.
Thanks,
Egor
hacya wrote:
| Quote: | I found the root problem on this topic.
If the path in the settings contains any symbolic link path, Nebeans is unable to attach the process. I mean when '/bin/pwd' doesn't match 'echo $PWD'. To avoid the problem, the path must be set based on the path returned from '/bin/pwd'. Otherwise, Netbeans fails to attach, even on Nebeans 6.7.
|
|
|
| Back to top |
|
 |
|