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 165211 - string instance parameter is shown as string *
Summary: string instance parameter is shown as string *
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-14 19:42 UTC by Alexander Pepin
Modified: 2016-07-06 14:38 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
gdb log (34.95 KB, text/plain)
2009-05-14 19:44 UTC, Alexander Pepin
Details
gdb log for gcc 4.1 compiled code (21.40 KB, text/plain)
2009-05-15 10:51 UTC, Alexander Pepin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2009-05-14 19:42:21 UTC
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").
Comment 1 Alexander Pepin 2009-05-14 19:44:55 UTC
Created attachment 82154 [details]
gdb log
Comment 2 Egor Ushakov 2009-05-15 09:47:59 UTC
unable to reproduce
Comment 3 Egor Ushakov 2009-05-15 10:15:46 UTC
reproduced on Windows even in NB 6.5.1, gdb reports name type as string*, we can not do anything here.
Comment 4 Alexander Pepin 2009-05-15 10:49:19 UTC
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).
Comment 5 Alexander Pepin 2009-05-15 10:51:50 UTC
Created attachment 82175 [details]
gdb log for gcc 4.1 compiled code
Comment 6 Alexander Pepin 2009-05-18 14:40:57 UTC
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"
Comment 7 Egor Ushakov 2009-05-20 07:54:01 UTC
looks more like an enhancement