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.

Bug 190919 - C Debug Program Arguments Not Working
Summary: C Debug Program Arguments Not Working
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Assignee: Egor Ushakov
URL:
Keywords:
: 192102 197792 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-11 18:11 UTC by powerofpi
Modified: 2011-11-16 16:40 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
gdb log (9.44 KB, text/plain)
2010-10-11 18:33 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description powerofpi 2010-10-11 18:11:36 UTC
http://forums.netbeans.org/viewtopic.php?p=87453#87453

It seems that with GDB 7.2 on Ubuntu, passing debug program arguments no longer works. This is a serious inconvenience (takes away a lot from debugging capability). Thanks.
Comment 1 soldatov 2010-10-11 18:26:42 UTC
Arguments doesn't appear if default GDB (7.2) is selected. But if I use GDB7.1 from http://ftp.gnu.org/gnu/gdb, then arguments appears.
Comment 2 soldatov 2010-10-11 18:33:24 UTC
Created attachment 102355 [details]
gdb log
Comment 3 Alexander Pepin 2010-10-13 12:04:31 UTC
It's not a P1, it should be fixed in the current development time frame.
Comment 4 Egor Ushakov 2010-10-20 10:26:38 UTC
before 7.2 -exec-run accepted program arguments...
Anyway that was not in the documentation, so I'll fix that to use -exec-arguments
Comment 5 Egor Ushakov 2010-10-20 11:56:19 UTC
fixed in:
http://hg.netbeans.org/cnd-main/rev/994806f86686
Comment 6 fabrizio.benedetti 2010-11-10 14:26:08 UTC
I am using NetBeans 6.9.1 on Windows XP Professional, and seems that the bug also happens here (not just on Ubuntu). The most recent version of CDN (1.9.2 Build 201007282301) seems to have been built before the bugfix was released.
Comment 7 fabrizio.benedetti 2010-11-10 15:21:38 UTC
(In reply to comment #6)

Additional information: I am using MinGW, and gdb version is 7.2; a co-worker installed gdb 7.1 and has the debug args working.

So, the issue is in gdb 7.2 and also on Windows, not just Ubuntu. How do I update CND in Windows?
Comment 8 Egor Ushakov 2010-11-10 15:39:48 UTC
they have changed commands syntax slightly in gdb 7.2
Comment 9 fabrizio.benedetti 2010-11-10 16:07:34 UTC
(In reply to comment #8)
> they have changed commands syntax slightly in gdb 7.2

I see... does the patch work for both gdb versions?

I see there is a 6.9.1-1 package for Linux, does it have the patch for this bug? And, what about Windows? Could it work if I copy the org-netbeans-modules-cnd-debugger-gdb.jar from that package? Or going back to gdb 7.1 is still the best solution (on windows, at least)?
Comment 10 Egor Ushakov 2010-11-10 16:56:24 UTC
yes, patch works for all gdb versions
Comment 11 Egor Ushakov 2010-11-10 16:58:09 UTC
link to the code changes is here in the comments, I'm not sure how and where to get bits with these changes...
Comment 12 fabrizio.benedetti 2010-11-11 11:32:55 UTC
I just installed 7.0M2, and I still can't get program args when debugging w/ gdb 7.2!

Thanks Egor, I will try to rebuild debugger-gdb.jar, or at least ckeck if the 7.0M2 version contains your patch.
Comment 13 Egor Ushakov 2010-11-18 17:11:31 UTC
*** Bug 192102 has been marked as a duplicate of this bug. ***
Comment 14 Alexander Pepin 2010-11-24 12:57:38 UTC
Marked as a candidate to next patch
Comment 15 Marian Mirilovic 2010-12-03 12:47:41 UTC
Egor,
please transplant fix into clone releases / branch release692, see http://wiki.netbeans.org/NetBeansPatchesProcess#How_to_proceed_with_patch for details by Tuesday 7th of December 2010. Thanks in advance.
Comment 16 Egor Ushakov 2010-12-03 13:49:49 UTC
integrated into releases/release692 with:
http://hg.netbeans.org/releases/rev/b1c40c851892
Comment 17 Egor Ushakov 2010-12-03 13:51:06 UTC
do we need to change spec versions?
Comment 18 Marian Mirilovic 2010-12-03 18:41:45 UTC
(In reply to comment #17)
> do we need to change spec versions?

Yes Egor, please do so. Thanks in advance.
Comment 19 Egor Ushakov 2010-12-06 09:54:21 UTC
spec versions increased in:
http://hg.netbeans.org/releases/rev/86141f1ade45
Comment 20 Alexander Pepin 2010-12-10 12:54:00 UTC
verified in patch3
Comment 21 Egor Ushakov 2010-12-14 09:54:48 UTC
Patch 3 is out! Please update your installations!
Comment 22 soldatov 2011-04-28 18:44:25 UTC
*** Bug 197792 has been marked as a duplicate of this bug. ***