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 200675 - code model fails to see local variables inside some functions generated by macros
Summary: code model fails to see local variables inside some functions generated by ma...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.0.1
Hardware: All All
: P2 normal (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-04 14:26 UTC by mgerdin
Modified: 2011-09-27 09:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mgerdin 2011-08-04 14:26:44 UTC
see http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/file/tip/src/share/vm/prims/jni.cpp

There are several functions using a macro
JNI_ENTRY(jobject,jni_FromReflectedField(JNIEnv *env, jobject field)) 
to create the first part of the function definition:

jobject jni_FromReflectedField(JNIEnv *env, jobject field) {

In some of these functions the code model does not recognize local variables.
Method parameters work properly.
Comment 1 Vladimir Voskresensky 2011-08-04 14:53:47 UTC
some details to have hostpot ready and configured for linux x64:
check out hotspot from http://hg.openjdk.java.net/jdk7/hotspot/hotspot
export ALT_BOOTDIR=/opt/jdk/latest
start nb from command line which has ALT_BOOTDIR
create project from existing sources using localhost with default GNU toolchain
specify make subfolder as containting makefile
specify build command as
make LP64=1 jvmg HOTSPOT_BUILD_JOBS=8
and clean as
make LP64=1 clean
update source folder to be hostpot instead of hotspot/make
Comment 2 nnnnnk 2011-09-13 14:21:38 UTC
#define FOO  void foo() { 

FOO
  int i; // unresolved i
}
Comment 3 nnnnnk 2011-09-14 10:58:13 UTC
fixed:
http://hg.netbeans.org/cnd-main/rev/8302cbf4080b
Comment 4 Vladimir Voskresensky 2011-09-20 10:42:52 UTC
I reviewed the fix and it is safe and correct
Comment 5 Vladimir Voskresensky 2011-09-20 11:42:01 UTC
integrated into releases_elif
8302cbf4080b transplanted to f57e4c212036
Comment 6 dnikitin 2011-09-21 11:35:18 UTC
verified in Build oss-platform-build-66-on-20110921
Comment 7 dnikitin 2011-09-27 09:26:10 UTC
verified in patch2 (NetBeans IDE 7.0.1 (Build 201109261118))