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.
Steps to reproduce: - create Quote sample - set a BP inside 'for' loop in 'getDiscountFor(string name)' function - start debugger - enter any name e.g. 'Ann' in the terminal - when debugger stops at BP open Variables view Result: Parameter 'name' has type 'string *' instead of 'string'. As a result tooltip does not show string content ("Ann").
Created attachment 82154 [details] gdb log
unable to reproduce
reproduced on Windows even in NB 6.5.1, gdb reports name type as string*, we can not do anything here.
It seems to be not a gdb issue but gcc "feature". It looks like gcc compiles code that passes objects to functions by reference instead of creating a copy of the object and gdb just frankly shows that. Another issue is if we use gcc 4.1. In that case we get in the same situation a wrong object (please see a new attached gdb log).
Created attachment 82175 [details] gdb log for gcc 4.1 compiled code
In the same situation on Mac we can see Name Type Value name string & @0x1421744 I think it would be better to show 'string *' and 'string &' in the same manner like 'string'. Probably we just need to add an address before the value e.g. Name Type Value [+]name string * 0x1421744 "Ann" or Name Type Value [+]name string & 0x1421744 "Ann"
looks more like an enhancement