| 
 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 -----  
  
  
  Sent: Friday, November 14, 2003 5:41 
  PM 
  Subject: Re: [cdt-dev] OS X port debugger 
  variables broken 
  
  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(); /x-tad-bigger>for/x-tad-bigger>/color> 
  (/x-tad-bigger>int/x-tad-bigger>/color> 
  i = 0; i < values.length; i++) { // <--- iterates twice /x-tad-bigger>if/x-tad-bigger>/color> 
  (values[i] 
  /x-tad-bigger>instanceof/x-tad-bigger>/color> 
  MITuple) { MIArg arg = getMIArg((MITuple)values[i]); // <<--- returns 
  null /x-tad-bigger>if/x-tad-bigger>/color> 
  (arg != /x-tad-bigger>null/x-tad-bigger>/color>) 
  { aList.add(arg); } } } /x-tad-bigger> It does not 
  iterator over results because results.length == 
  0.
  MIResult[] results = miList.getMIResults(); /x-tad-bigger>for/x-tad-bigger>/color> 
  (/x-tad-bigger>int/x-tad-bigger>/color> 
  i = 0; i < results.length; i++) { // <<--- results.length == 
  0 MIValue value = results[i].getMIValue(); /x-tad-bigger>if/x-tad-bigger>/color> 
  (value 
/x-tad-bigger>instanceof/x-tad-bigger>/color> 
  MIConst) { String str = ((MIConst)value).getCString(); aList.add(/x-tad-bigger>new/x-tad-bigger>/color> 
  MIArg(str, /x-tad-bigger>""/x-tad-bigger>/color>)); } } /x-tad-bigger> 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./smaller>/fontfamily>   ----- 
    Original Message -----/x-tad-bigger>/fontfamily> From:/x-tad-bigger>/fontfamily> 
/x-tad-bigger>Bryan Hunt/x-tad-bigger>/color> 
    /x-tad-bigger>/fontfamily> To:/x-tad-bigger>/fontfamily> 
/x-tad-bigger>cdt-dev@xxxxxxxxxxx/x-tad-bigger>/color> 
/x-tad-bigger>/fontfamily> Sent:/x-tad-bigger>/fontfamily>Friday, 
    November 14, 2003 2:50 PM/x-tad-bigger>/fontfamily> Subject:/x-tad-bigger>/fontfamily>Re: 
    [cdt-dev] OS X port debugger variables 
    broken/x-tad-bigger>/fontfamily>
  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
   
 |