Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] OS X port debugger variables broken

[acme:/usr/include/mach] bhunt% gdb --version
GNU gdb 5.3-20030128 (Apple version gdb-292) (Sat Sep 20 03:22:27 GMT 2003)

On Nov 14, 2003, at 4:45 PM, Mikhail Khodjaiants wrote:

Which version of gdb you are using?
I know that Apple have a version of gdb with modified mi interface. They use it for their IDE.
 
----- Original Message -----
<x-tad-bigger>From:</x-tad-bigger><x-tad-bigger> </x-tad-bigger><x-tad-bigger>Bryan Hunt</x-tad-bigger><x-tad-bigger> </x-tad-bigger>
<x-tad-bigger>To:</x-tad-bigger><x-tad-bigger> </x-tad-bigger><x-tad-bigger>cdt-dev@xxxxxxxxxxx</x-tad-bigger><x-tad-bigger> </x-tad-bigger>
<x-tad-bigger>Sent:</x-tad-bigger><x-tad-bigger>Friday, November 14, 2003 5:41 PM</x-tad-bigger>
<x-tad-bigger>Subject:</x-tad-bigger><x-tad-bigger>Re: [cdt-dev] OS X port debugger variables broken</x-tad-bigger>

I found part of the problem, but not the root cause. MIArg.getMIArgs() does not correctly parse the line returned from gdb:

[1,068,836,027,826] 29^done,stack-args=[frame={level="0",args=[{name="argc"},{name="argv"}]}]

It iterates over values[] twice as expected, but getMIArg() returns null because it is not of the form {name="xxx",value="yyy"}

MIValue[] values = miList.getMIValues();
for (int i = 0; i < values.length; i++) { // <--- iterates twice
if (values[i] instanceof MITuple) {
MIArg arg = getMIArg((MITuple)values[i]); // <<--- returns null
if (arg != null) {
aList.add(arg);
}
}
}

It does not iterator over results because results.length == 0.

MIResult[] results = miList.getMIResults();
for (int i = 0; i < results.length; i++) { // <<--- results.length == 0
MIValue value = results[i].getMIValue();
if (value instanceof MIConst) {
String str = ((MIConst)value).getCString();
aList.add(new MIArg(str, ""));
}
}

Bryan


On Nov 14, 2003, at 2:37 PM, Mikhail Khodjaiants wrote:


Well, everything looks good. The only way is to debug the code. You can start the session. When program is suspended, close the Variables View, set a breakpoint in the 'refresh' method of 'org.eclipse.debug.internal.ui.views.variables.VariablesViewer' and open the Variables View.
 
----- Original Message -----
From:Bryan Hunt
To:cdt-dev@xxxxxxxxxxx
Sent:Friday, November 14, 2003 2:50 PM
Subject:Re: [cdt-dev] OS X port debugger variables broken

The thread is suspended, and the stack frame is selected in the Debug view. Here is the screenshot:





On Nov 14, 2003, at 1:25 PM, Mikhail Khodjaiants wrote:


Seems to work fine.
The content of the Variables View depend on the item selected in the Debug View. It displays variables only if the selected item is a stack frame. And the target has to be suspended. What is displayed in your Debug View? 
----- Original Message -----
From:Bryan Hunt
To:cdt-dev@xxxxxxxxxxx
Sent:Friday, November 14, 2003 2:00 PM
Subject:Re: [cdt-dev] OS X port debugger variables broken

I'm not familiar with the MI, but here is a section of the trace where the locals are retrieved, but not displayed on the Variables window.

[1,068,836,027,717] (gdb)
[1,068,836,027,723] 28-stack-list-frames 0 0
[1,068,836,027,724] 28^done,stack=[frame={level="0",addr="0x00001dd0",fp="0xbffffc60",func="main",fi\
le="hello.C",line="8",dir="/Applications/Eclipse 2.1.2/runtime-workspace/Foo/"}]
[1,068,836,027,725] (gdb)
[1,068,836,027,825] 29-stack-list-arguments 0 0 0
[1,068,836,027,826] 29^done,stack-args=[frame={level="0",args=[{name="argc"},{name="argv"}]}]
[1,068,836,027,827] (gdb)
[1,068,836,027,828] 30-stack-list-locals 0
[1,068,836,027,828] 30^done,locals=[{name="x"}]
[1,068,836,027,829] (gdb)

On Nov 14, 2003, at 9:56 AM, Mikhail Khodjaiants wrote:


The CDT doesn't use the binary parser to display variables. All information
comes from gdb.
You can trace the communication between gdb and CDT. See the topic"Can I
see/log all of the commands which are being driven to gdb?" of CDT FAQ for
details.

----- Original Message -----
From: "Bryan Hunt" <bhunt@xxxxxxx>
To: <cdt-dev@xxxxxxxxxxx>
Sent: Friday, November 14, 2003 10:50 AM
Subject: Re: [cdt-dev] OS X port debugger variables broken



The log file contains no errors. Is the binary parser used for
displaying variables? This is something I don't have working yet.

Bryan

On Nov 11, 2003, at 5:16 PM, Mikhail Khodjaiants wrote:


Check the .log file for errors.

----- Original Message -----
From: "Bryan Hunt" <bhunt@xxxxxxx>
To: <cdt-dev@xxxxxxxxxxx>
Sent: Tuesday, November 11, 2003 12:14 PM
Subject: [cdt-dev] OS X port debugger variables broken



The Variables view in the debugger perspective is not working for me.
I can cursor over a simple int variable and get it's value in a
tool-tip, but it doesn't display in the Variables window - the
Variables window is blank. Any ideas on how to track this down
(breakpoints I could set) would be appreciated.

Bryan

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev

Back to the top