Home » Language IDEs » C / C++ IDE (CDT) » Add a global variable with CDT 2.1 generates a "Null pointer exception"
Add a global variable with CDT 2.1 generates a "Null pointer exception" [message #134767] |
Thu, 13 January 2005 11:06  |
Eclipse User |
|
|
|
Hello,
With CDT 2.1, in Debug perspective, when I try to "Add a global variable"
to the "Variables" View, the following Null pointer exception occurs.
I can't add any global variable in the Variable view.
This feature works fine with the CDT 2.0.2 and same program.
Any idea ? Is it a known bug ?
Thanks
Jerome
----------------------------------
!ENTRY org.eclipse.ui 4 0 Jan 13, 2005 16:46:56.500
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at
org.eclipse.cdt.debug.internal.core.model.CDebugTarget.creat eGlobalVariable(CDebugTarget.java:1877)
at
org.eclipse.cdt.debug.internal.core.CGlobalVariableManager.a ddGlobals(CGlobalVariableManager.java:104)
at
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.doAction(AddGlobalsActionDelegate.java:269)
at
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate$1.run(AddGlobalsActionDelegate.java:100)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.run(AddGlobalsActionDelegate.java:96)
at
org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:71)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:266)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866)
at
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)
|
|
| | | |
Re: Add a global variable with CDT 2.1 generates a "Null pointer exception" [message #134915 is a reply to message #134794] |
Fri, 14 January 2005 10:48   |
Eclipse User |
|
|
|
When I debug the plugin, in the file "AddGlobalsActionDelegate.java", in
'doAction' method, the variables in the selected list (CVariableFactory)
have path=null. It seems that it is this 'null' value that generates the
exception.
In 'CDebugTarget.java', 'getCFileGlobals' method, all symbols have also
their sourceFile = null.
Any idea ?
Mikhail Khodjaiants wrote:
> Which platform are you using?
> "jerome correnoz" <jerome.correnoz@st.com> wrote in message
> news:cs66al$8nb$1@www.eclipse.org...
>> Hello,
>>
>> With CDT 2.1, in Debug perspective, when I try to "Add a global variable"
>> to the "Variables" View, the following Null pointer exception occurs.
>>
>> I can't add any global variable in the Variable view.
>> This feature works fine with the CDT 2.0.2 and same program.
>>
>> Any idea ? Is it a known bug ?
>>
>> Thanks
>> Jerome
>>
>> ----------------------------------
>> !ENTRY org.eclipse.ui 4 0 Jan 13, 2005 16:46:56.500
>> !MESSAGE java.lang.NullPointerException
>> !STACK 0
>> java.lang.NullPointerException
>> at
>>
org.eclipse.cdt.debug.internal.core.model.CDebugTarget.creat eGlobalVariable(CDebugTarget.java:1877)
>> at
>>
org.eclipse.cdt.debug.internal.core.CGlobalVariableManager.a ddGlobals(CGlobalVariableManager.java:104)
>> at
>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.doAction(AddGlobalsActionDelegate.java:269)
>> at
>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate$1.run(AddGlobalsActionDelegate.java:100)
>> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>> at
>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.run(AddGlobalsActionDelegate.java:96)
>> at
>> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:71)
>> at
>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:266)
>> at
>>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:915)
>> at
>>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866)
>> at
>>
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
>> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
>> at
>>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
>> at org.eclipse.core.launcher.Main.run(Main.java:704)
>> at org.eclipse.core.launcher.Main.main(Main.java:688)
>>
>>
>>
|
|
|
Re: Add a global variable with CDT 2.1 generates a "Null pointer exception" [message #134928 is a reply to message #134915] |
Fri, 14 January 2005 11:16   |
Eclipse User |
|
|
|
Originally posted by: mikhailkhod.rogers.com
We retrieve this information parsing the executable. The problem may be
caused by a parsing error or incorrect debug information. Either way we
should check if path != null, so this is a bug.
"jerome correnoz" <jerome.correnoz@st.com> wrote in message
news:cs8pl6$urt$1@www.eclipse.org...
> When I debug the plugin, in the file "AddGlobalsActionDelegate.java", in
> 'doAction' method, the variables in the selected list (CVariableFactory)
> have path=null. It seems that it is this 'null' value that generates the
> exception.
> In 'CDebugTarget.java', 'getCFileGlobals' method, all symbols have also
> their sourceFile = null.
> Any idea ?
>
> Mikhail Khodjaiants wrote:
>
> > Which platform are you using?
>
> > "jerome correnoz" <jerome.correnoz@st.com> wrote in message
> > news:cs66al$8nb$1@www.eclipse.org...
> >> Hello,
> >>
> >> With CDT 2.1, in Debug perspective, when I try to "Add a global
variable"
> >> to the "Variables" View, the following Null pointer exception occurs.
> >>
> >> I can't add any global variable in the Variable view.
> >> This feature works fine with the CDT 2.0.2 and same program.
> >>
> >> Any idea ? Is it a known bug ?
> >>
> >> Thanks
> >> Jerome
> >>
> >> ----------------------------------
> >> !ENTRY org.eclipse.ui 4 0 Jan 13, 2005 16:46:56.500
> >> !MESSAGE java.lang.NullPointerException
> >> !STACK 0
> >> java.lang.NullPointerException
> >> at
> >>
>
org.eclipse.cdt.debug.internal.core.model.CDebugTarget.creat eGlobalVariable(
CDebugTarget.java:1877)
> >> at
> >>
>
org.eclipse.cdt.debug.internal.core.CGlobalVariableManager.a ddGlobals(CGloba
lVariableManager.java:104)
> >> at
> >>
>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.doAction(
AddGlobalsActionDelegate.java:269)
> >> at
> >>
>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate$1.run(Add
GlobalsActionDelegate.java:100)
> >> at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> >> at
> >>
>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.run(AddGl
obalsActionDelegate.java:96)
> >> at
> >>
org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:71)
> >> at
> >>
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:266)
> >> at
> >>
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:915)
> >> at
> >>
>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
tem.java:866)
> >> at
> >>
>
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
tionItem.java:785)
> >> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> >> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> >> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
> >> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
> >> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
> >> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
> >> at
> >>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
> >> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> >> at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
> >> at
> >>
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:335)
> >> at
> >>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
> >> at
> >>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >> at java.lang.reflect.Method.invoke(Unknown Source)
> >> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
> >> at org.eclipse.core.launcher.Main.run(Main.java:704)
> >> at org.eclipse.core.launcher.Main.main(Main.java:688)
> >>
> >>
> >>
>
>
|
|
|
Re: Add a global variable with CDT 2.1 generates a "Null pointer exception" [message #135102 is a reply to message #134928] |
Mon, 17 January 2005 04:53   |
Eclipse User |
|
|
|
Is this information in the DWARF ?
Mikhail Khodjaiants wrote:
> We retrieve this information parsing the executable. The problem may be
> caused by a parsing error or incorrect debug information. Either way we
> should check if path != null, so this is a bug.
> "jerome correnoz" <jerome.correnoz@st.com> wrote in message
> news:cs8pl6$urt$1@www.eclipse.org...
>> When I debug the plugin, in the file "AddGlobalsActionDelegate.java", in
>> 'doAction' method, the variables in the selected list (CVariableFactory)
>> have path=null. It seems that it is this 'null' value that generates the
>> exception.
>> In 'CDebugTarget.java', 'getCFileGlobals' method, all symbols have also
>> their sourceFile = null.
>> Any idea ?
>>
>> Mikhail Khodjaiants wrote:
>>
>> > Which platform are you using?
>>
>> > "jerome correnoz" <jerome.correnoz@st.com> wrote in message
>> > news:cs66al$8nb$1@www.eclipse.org...
>> >> Hello,
>> >>
>> >> With CDT 2.1, in Debug perspective, when I try to "Add a global
> variable"
>> >> to the "Variables" View, the following Null pointer exception occurs.
>> >>
>> >> I can't add any global variable in the Variable view.
>> >> This feature works fine with the CDT 2.0.2 and same program.
>> >>
>> >> Any idea ? Is it a known bug ?
>> >>
>> >> Thanks
>> >> Jerome
>> >>
>> >> ----------------------------------
>> >> !ENTRY org.eclipse.ui 4 0 Jan 13, 2005 16:46:56.500
>> >> !MESSAGE java.lang.NullPointerException
>> >> !STACK 0
>> >> java.lang.NullPointerException
>> >> at
>> >>
>>
> org.eclipse.cdt.debug.internal.core.model.CDebugTarget.creat eGlobalVariable(
> CDebugTarget.java:1877)
>> >> at
>> >>
>>
> org.eclipse.cdt.debug.internal.core.CGlobalVariableManager.a ddGlobals(CGloba
> lVariableManager.java:104)
>> >> at
>> >>
>>
> org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.doAction(
> AddGlobalsActionDelegate.java:269)
>> >> at
>> >>
>>
> org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate$1.run(Add
> GlobalsActionDelegate.java:100)
>> >> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>> >> at
>> >>
>>
> org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.run(AddGl
> obalsActionDelegate.java:96)
>> >> at
>> >>
> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:71)
>> >> at
>> >>
> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:266)
>> >> at
>> >>
>>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
> ContributionItem.java:915)
>> >> at
>> >>
>>
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
> tem.java:866)
>> >> at
>> >>
>>
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
> tionItem.java:785)
>> >> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>> >> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>> >> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>> >> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>> >> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
>> >> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
>> >> at
>> >>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
>> >> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
>> >> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
>> >> at
>> >>
>>
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> java:335)
>> >> at
>> >>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
>> >> at
>> >>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
>> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> >> at java.lang.reflect.Method.invoke(Unknown Source)
>> >> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
>> >> at org.eclipse.core.launcher.Main.run(Main.java:704)
>> >> at org.eclipse.core.launcher.Main.main(Main.java:688)
>> >>
>> >>
>> >>
>>
>>
|
|
|
Re: Add a global variable with CDT 2.1 generates a "Null pointer exception" [message #135177 is a reply to message #135102] |
Mon, 17 January 2005 12:39   |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
jerome correnoz wrote:
> Is this information in the DWARF ?
The Dwarf parser is not finish.
If you are using cygwin i.e. the PE Windows Parser
we use the binutils tools: nm, addr2line to retrieve
the information. I've notice in many cases the information
return by the utilities are erroneous.
> Mikhail Khodjaiants wrote:
>> We retrieve this information parsing the executable. The problem may be
>> caused by a parsing error or incorrect debug information. Either way we
>> should check if path != null, so this is a bug.
>> "jerome correnoz" <jerome.correnoz@st.com> wrote in message
>> news:cs8pl6$urt$1@www.eclipse.org...
>>> When I debug the plugin, in the file "AddGlobalsActionDelegate.java", in
>>> 'doAction' method, the variables in the selected list (CVariableFactory)
>>> have path=null. It seems that it is this 'null' value that generates the
>>> exception.
>>> In 'CDebugTarget.java', 'getCFileGlobals' method, all symbols have also
>>> their sourceFile = null.
>>> Any idea ?
>>>
>>> Mikhail Khodjaiants wrote:
>>>
>>> > Which platform are you using?
>>>
>>> > "jerome correnoz" <jerome.correnoz@st.com> wrote in message
>>> > news:cs66al$8nb$1@www.eclipse.org...
>>> >> Hello,
>>> >>
>>> >> With CDT 2.1, in Debug perspective, when I try to "Add a global
>> variable"
>>> >> to the "Variables" View, the following Null pointer exception occurs.
>>> >>
>>> >> I can't add any global variable in the Variable view.
>>> >> This feature works fine with the CDT 2.0.2 and same program.
>>> >>
>>> >> Any idea ? Is it a known bug ?
>>> >>
>>> >> Thanks
>>> >> Jerome
>>> >>
>>> >> ----------------------------------
>>> >> !ENTRY org.eclipse.ui 4 0 Jan 13, 2005 16:46:56.500
>>> >> !MESSAGE java.lang.NullPointerException
>>> >> !STACK 0
>>> >> java.lang.NullPointerException
>>> >> at
>>> >>
>>>
>> org.eclipse.cdt.debug.internal.core.model.CDebugTarget.creat eGlobalVariable(
>> CDebugTarget.java:1877)
>>> >> at
>>> >>
>>>
>> org.eclipse.cdt.debug.internal.core.CGlobalVariableManager.a ddGlobals(CGloba
>> lVariableManager.java:104)
>>> >> at
>>> >>
>>>
>> org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.doAction(
>> AddGlobalsActionDelegate.java:269)
>>> >> at
>>> >>
>>>
>> org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate$1.run(Add
>> GlobalsActionDelegate.java:100)
>>> >> at
>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>> >> at
>>> >>
>>>
>> org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.run(AddGl
>> obalsActionDelegate.java:96)
>>> >> at
>>> >>
>> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:71)
>>> >> at
>>> >>
>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:266)
>>> >> at
>>> >>
>>>
>> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
>> ContributionItem.java:915)
>>> >> at
>>> >>
>>>
>> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
>> tem.java:866)
>>> >> at
>>> >>
>>>
>> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
>> tionItem.java:785)
>>> >> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>> >> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>> >> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>> >> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>> >> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
>>> >> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
>>> >> at
>>> >>
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
>>> >> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
>>> >> at
>> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
>>> >> at
>>> >>
>>>
>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
>> java:335)
>>> >> at
>>> >>
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
>>> >> at
>>> >>
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
>>> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>> >> at java.lang.reflect.Method.invoke(Unknown Source)
>>> >> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
>>> >> at org.eclipse.core.launcher.Main.run(Main.java:704)
>>> >> at org.eclipse.core.launcher.Main.main(Main.java:688)
>>> >>
>>> >>
>>> >>
>>>
>>>
|
|
|
Re: Add a global variable with CDT 2.1 generates a "Null pointer exception" [message #135239 is a reply to message #135177] |
Tue, 18 January 2005 02:13   |
Eclipse User |
|
|
|
Thanks for your answer.
I'm using org.eclipse.cdt.core.ELF binary parser for a ST100 core.
alain wrote:
> jerome correnoz wrote:
>> Is this information in the DWARF ?
> The Dwarf parser is not finish.
> If you are using cygwin i.e. the PE Windows Parser
> we use the binutils tools: nm, addr2line to retrieve
> the information. I've notice in many cases the information
> return by the utilities are erroneous.
>> Mikhail Khodjaiants wrote:
>>> We retrieve this information parsing the executable. The problem may be
>>> caused by a parsing error or incorrect debug information. Either way we
>>> should check if path != null, so this is a bug.
>>> "jerome correnoz" <jerome.correnoz@st.com> wrote in message
>>> news:cs8pl6$urt$1@www.eclipse.org...
>>>> When I debug the plugin, in the file "AddGlobalsActionDelegate.java", in
>>>> 'doAction' method, the variables in the selected list (CVariableFactory)
>>>> have path=null. It seems that it is this 'null' value that generates the
>>>> exception.
>>>> In 'CDebugTarget.java', 'getCFileGlobals' method, all symbols have also
>>>> their sourceFile = null.
>>>> Any idea ?
>>>>
>>>> Mikhail Khodjaiants wrote:
>>>>
>>>> > Which platform are you using?
>>>>
>>>> > "jerome correnoz" <jerome.correnoz@st.com> wrote in message
>>>> > news:cs66al$8nb$1@www.eclipse.org...
>>>> >> Hello,
>>>> >>
>>>> >> With CDT 2.1, in Debug perspective, when I try to "Add a global
>>> variable"
>>>> >> to the "Variables" View, the following Null pointer exception occurs.
>>>> >>
>>>> >> I can't add any global variable in the Variable view.
>>>> >> This feature works fine with the CDT 2.0.2 and same program.
>>>> >>
>>>> >> Any idea ? Is it a known bug ?
>>>> >>
>>>> >> Thanks
>>>> >> Jerome
>>>> >>
>>>> >> ----------------------------------
>>>> >> !ENTRY org.eclipse.ui 4 0 Jan 13, 2005 16:46:56.500
>>>> >> !MESSAGE java.lang.NullPointerException
>>>> >> !STACK 0
>>>> >> java.lang.NullPointerException
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.core.model.CDebugTarget.creat eGlobalVariable(
>>> CDebugTarget.java:1877)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.core.CGlobalVariableManager.a ddGlobals(CGloba
>>> lVariableManager.java:104)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.doAction(
>>> AddGlobalsActionDelegate.java:269)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate$1.run(Add
>>> GlobalsActionDelegate.java:100)
>>>> >> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.run(AddGl
>>> obalsActionDelegate.java:96)
>>>> >> at
>>>> >>
>>> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:71)
>>>> >> at
>>>> >>
>>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:266)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
>>> ContributionItem.java:915)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
>>> tem.java:866)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
>>> tionItem.java:785)
>>>> >> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>> >> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>> >> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>> >> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>> >> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
>>>> >> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
>>>> >> at
>>>> >>
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
>>>> >> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
>>>> >> at
>>> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
>>> java:335)
>>>> >> at
>>>> >>
>>>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
>>>> >> at
>>>> >>
>>>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
>>>> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>> >> at java.lang.reflect.Method.invoke(Unknown Source)
>>>> >> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
>>>> >> at org.eclipse.core.launcher.Main.run(Main.java:704)
>>>> >> at org.eclipse.core.launcher.Main.main(Main.java:688)
>>>> >>
>>>> >>
>>>> >>
>>>>
>>>>
|
|
|
Re: Add a global variable with CDT 2.1 generates a "Null pointer exception" [message #135261 is a reply to message #135177] |
Tue, 18 January 2005 03:02   |
Eclipse User |
|
|
|
You use nm and addr2line to retrieve this debug information but how is
this information used by the CDT ? Is it necessary ? What are the
limitations with CDT if this information isn't returned.
alain wrote:
> jerome correnoz wrote:
>> Is this information in the DWARF ?
> The Dwarf parser is not finish.
> If you are using cygwin i.e. the PE Windows Parser
> we use the binutils tools: nm, addr2line to retrieve
> the information. I've notice in many cases the information
> return by the utilities are erroneous.
>> Mikhail Khodjaiants wrote:
>>> We retrieve this information parsing the executable. The problem may be
>>> caused by a parsing error or incorrect debug information. Either way we
>>> should check if path != null, so this is a bug.
>>> "jerome correnoz" <jerome.correnoz@st.com> wrote in message
>>> news:cs8pl6$urt$1@www.eclipse.org...
>>>> When I debug the plugin, in the file "AddGlobalsActionDelegate.java", in
>>>> 'doAction' method, the variables in the selected list (CVariableFactory)
>>>> have path=null. It seems that it is this 'null' value that generates the
>>>> exception.
>>>> In 'CDebugTarget.java', 'getCFileGlobals' method, all symbols have also
>>>> their sourceFile = null.
>>>> Any idea ?
>>>>
>>>> Mikhail Khodjaiants wrote:
>>>>
>>>> > Which platform are you using?
>>>>
>>>> > "jerome correnoz" <jerome.correnoz@st.com> wrote in message
>>>> > news:cs66al$8nb$1@www.eclipse.org...
>>>> >> Hello,
>>>> >>
>>>> >> With CDT 2.1, in Debug perspective, when I try to "Add a global
>>> variable"
>>>> >> to the "Variables" View, the following Null pointer exception occurs.
>>>> >>
>>>> >> I can't add any global variable in the Variable view.
>>>> >> This feature works fine with the CDT 2.0.2 and same program.
>>>> >>
>>>> >> Any idea ? Is it a known bug ?
>>>> >>
>>>> >> Thanks
>>>> >> Jerome
>>>> >>
>>>> >> ----------------------------------
>>>> >> !ENTRY org.eclipse.ui 4 0 Jan 13, 2005 16:46:56.500
>>>> >> !MESSAGE java.lang.NullPointerException
>>>> >> !STACK 0
>>>> >> java.lang.NullPointerException
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.core.model.CDebugTarget.creat eGlobalVariable(
>>> CDebugTarget.java:1877)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.core.CGlobalVariableManager.a ddGlobals(CGloba
>>> lVariableManager.java:104)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.doAction(
>>> AddGlobalsActionDelegate.java:269)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate$1.run(Add
>>> GlobalsActionDelegate.java:100)
>>>> >> at
>>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.cdt.debug.internal.ui.actions.AddGlobalsActionDe legate.run(AddGl
>>> obalsActionDelegate.java:96)
>>>> >> at
>>>> >>
>>> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:71)
>>>> >> at
>>>> >>
>>> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:266)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
>>> ContributionItem.java:915)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
>>> tem.java:866)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContribu
>>> tionItem.java:785)
>>>> >> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
>>>> >> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>>>> >> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>>>> >> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>>>> >> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
>>>> >> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
>>>> >> at
>>>> >>
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
>>>> >> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
>>>> >> at
>>> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
>>>> >> at
>>>> >>
>>>>
>>>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
>>> java:335)
>>>> >> at
>>>> >>
>>>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
>>>> >> at
>>>> >>
>>>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
>>>> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>> >> at java.lang.reflect.Method.invoke(Unknown Source)
>>>> >> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
>>>> >> at org.eclipse.core.launcher.Main.run(Main.java:704)
>>>> >> at org.eclipse.core.launcher.Main.main(Main.java:688)
>>>> >>
>>>> >>
>>>> >>
>>>>
>>>>
|
|
|
Re: Add a global variable with CDT 2.1 generates a "Null pointer exception" [message #135337 is a reply to message #135261] |
Tue, 18 January 2005 10:49  |
Eclipse User |
|
|
|
Originally posted by: alain.nowhere.ca
jerome correnoz wrote:
> You use nm and addr2line to retrieve this debug information but how is
> this information used by the CDT ? Is it necessary ? What are the
> limitations with CDT if this information isn't returned.
At the current time not much:
- the add global variable action may not work
- adding breakpoints in the outliner of a binary
- Many ISV using the CDT as the base of there IDE
use the information in there own plugin(for example some memory analysis)
- Some browsing capabilities may not work
But this is no show stopper any most users will not even notice.
|
|
|
Goto Forum:
Current Time: Fri May 02 00:26:19 EDT 2025
Powered by FUDForum. Page generated in 0.04909 seconds
|