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 242884 - 'Step into last or selected function' does not work with C++
Summary: 'Step into last or selected function' does not work with C++
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.0
Hardware: All All
: P2 normal (vote)
Assignee: henk89
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 00:57 UTC by jackua
Modified: 2014-06-27 02:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test case (344 bytes, text/x-c++src)
2014-04-17 04:07 UTC, jackua
Details
gdb log (4.64 KB, text/x-log)
2014-04-17 04:07 UTC, jackua
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jackua 2014-03-14 00:57:13 UTC
This did not work in 7.4 and still does not work.
Even for a simple function, not a class member, no templates, I am having a dialog with en error 
   Function \"Somename\" not defined.
The function is inside a namespace as all of them are. The function is searchable by Go to Symbol.  I tried many functions and found no working examples yet.

Product Version: NetBeans IDE 8.0 Beta (Build 201401141042)
Java: 1.7.0_51; Java HotSpot(TM) Client VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Linux version 2.6.18-308.el5 running on i386; ANSI_X3.4-1968; en_US (nb)

Red Hat Enterprise Linux Client release 5.8 (Tikanga)
GNU gdb (GDB) 7.6.2
Comment 1 henk89 2014-04-14 13:01:25 UTC
Could you please provide the scenario to reproduce the issue?
Comment 2 jackua 2014-04-16 05:00:03 UTC
I cannot find cases when it works.  I don't know how to describe "any case".  Will WebEx session be helpful?  I guess mail redirector works here and we can find each other in next few days though mail.
Comment 3 jackua 2014-04-17 04:05:01 UTC
Just two functions worked fine but when I wrapped them into a class , stepinto stopped working.
Attaching a source file and gdb log from start to missed step into.
I created NB project from scratch with whatever Makefile was generated (I can attach the project too).
Comment 4 jackua 2014-04-17 04:07:16 UTC
Created attachment 146793 [details]
test case

dummy program with a class where stepinto does not work.
Set breakpoints on foo() and return and try to step into foo.  You will hit return.
Comment 5 jackua 2014-04-17 04:07:39 UTC
Created attachment 146794 [details]
gdb log
Comment 6 jackua 2014-04-17 04:10:47 UTC
BTW, current behavior is worse than if the feature just does not work.
If it does not work, stepinto would do nothing.
Currently, stepinto shows a dialog and then does CONTINUE.  Oops, we run away from a place of debugging.
Comment 7 Vladimir Voskresensky 2014-04-18 03:22:20 UTC
Nikolay, please, evaluate
Comment 8 henk89 2014-05-26 14:22:13 UTC
(In reply to jackua from comment #4)
> Created attachment 146793 [details]
> test case
> 
> dummy program with a class where stepinto does not work.
> Set breakpoints on foo() and return and try to step into foo.  You will hit
> return.

Could you please clarify what certain steps I should make?
Comment 9 henk89 2014-05-26 14:56:54 UTC
The only reason for the debugger to fail is setting the incorrect functional breakpoint: c.foo in this case. Please, try typing C::foo instead.
Comment 10 jackua 2014-06-03 23:01:50 UTC
This is a pure GUI feature.  I am not supposed to "type" anything.
If I select a function and then click "Step into last or selected function..." button, /tmp/gdb-cmds...log shows 
  43-break-insert -t c.foo
  44-exec-continue
  43^error,msg="Function \"c.foo\" not defined."
  (gdb)
  44^running
I am not going to type such commands in debug console.  Even more, debug console by default is hidden and some NB developers are trying to keep it hidden all the time.  Even more, I have to know all correct types to use that functionality.  What's the point in having a button if I need to type commands in console?
I miss that button ...

I used today's NB 8.0 installation.
Has anybody tried my tiny program on Linux successfully?
Comment 11 henk89 2014-06-04 09:18:55 UTC
(In reply to jackua from comment #10)
> This is a pure GUI feature.  I am not supposed to "type" anything.
There is another way to set a functional breakpoint there you can type a full function name manually. This should be your way since the debugger is unable to somehow connect c.foo and C::foo.
> If I select a function and then click "Step into last or selected
> function..." button, /tmp/gdb-cmds...log shows 
>   43-break-insert -t c.foo
>   44-exec-continue
>   43^error,msg="Function \"c.foo\" not defined."
>   (gdb)
>   44^running
> I am not going to type such commands in debug console.  Even more, debug
> console by default is hidden and some NB developers are trying to keep it
> hidden all the time.  Even more, I have to know all correct types to use
> that functionality.  What's the point in having a button if I need to type
> commands in console?
There is no need to type anything in the console! You should use Debug->New Breakpoint. This button works with functions not being class members.
> I miss that button ...
> 
> I used today's NB 8.0 installation.
> Has anybody tried my tiny program on Linux successfully?
Comment 12 henk89 2014-06-26 11:20:58 UTC
Fixed in:
http://hg.netbeans.org/cnd-main/rev/ff5be9d5d143
Comment 13 Quality Engineering 2014-06-27 02:28:46 UTC
Integrated into 'main-silver', will be available in build *201406270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ff5be9d5d143
User: Nikolay Koldunov <henk89@netbeans.org>
Log: Fixed #242884 - 'Step into last or selected function' does not work with C++