From: stoler@seas.gwu.edu (Rich Stoler)
Subject: xdb problem
Organization: George Washington University
Date: Tue, 10 Nov 1992 15:32:53 GMT

A user has been having a problem with xdb that he, and we, ar unable to figure
out.  He is unable to reference elements of a data structure from within the
debugger, as shown below.  We have included the full screen of text in the hope
someone more knowledgeable may be able to find out or explain what we're doing
or not doing.  Thanks in advance.
-------------------------------------------------------------------------------
This is a screen of my debugger run (I use a big screen!).

      33:     printf("max principal stress = %f angle= %f\n",max_principal,
      34:                                       theta_max_principal*180/PI);
      35:     printf("at element = %d  node = %d\n",ielem_max_principal,
      36:                                              inode_max_principal);
      37:     fprintf(fd,"max principal stress = %f angle= %f\n",max_princip
      38:                                       theta_max_principal*180/PI);
      39:     fprintf(fd,"at element = %d  node = %d\n",ielem_max_principal,
      40:                                              inode_max_principal);
      41:   crack[number_of_tips].angle=theta_max_principal;
      42:   crack[number_of_tips].node=inode_max_principal;
      43: }
      44: /****************************************************************/
      45: void get_crack(node_A,length,theta)
      46:    int node_A;
      47:    double length,theta;
      48: {
      49:    int node_B,mesh_el[2],mesh_type,i;
      50:    double angle;
      51:    Create_Node(node_array[node_A-1].x,node_array[node_A-1].y,
      52:                node_array[node_A-1].z);
      53:    node_B = analysis.nodes;
      54:    angle = (theta>PI/2.0)? theta-3.0*PI/2.0: theta+PI/2.0;
*>    55:    if (is_boundary_node(node_A))
      56:    {
      57:       mesh_type = get_mesh_type(mesh_el,node_A,node_B,angle);
      58:       for (i=0;i<4;i++)
      59:       {
      60:          if (element[mesh_el[mesh_type]].node[i]==node_A)
      61:             break;
      62:       }
      63:       put_crack(mesh_el,mesh_type,node_B,node_A,length,angle);
      64:       i = (i==0)? 3: i-1;
      65:       update_crack_node(element[mesh_el[mesh_type]].neighbors[i],n
      66:    }
      67:    else
      68:    {
      69:       mesh_type = get_mesh_type(mesh_el,node_A,node_B,angle);
      70:       put_crack(mesh_el,mesh_type,node_B,node_A,length/2.0,angle);
      71:       angle += (angle<0.0)? PI: -PI;
 File: hplcrack.c    Procedure: get_crack    Line: 55
solving equations
forming stiffness matrix
max principal stress = 2104022.238632 angle= 14.457992
at element = 64  node = 5
area weighted stress smoothing
error estimation
elements=102,nodes=118
global error=5.597142
 Select CONTINUE / NEXT STEP / EXIT in the menu
max principal stress = 2104022.238632 angle= 14.457992
at element = 64  node = 5
Input crack length
0.7

breakpoint at 0x2eda                        This is where output from the
                                            program ends and debuger session
                                            begins.
>p node_A
node_A = 5
>p element[63].neighbors[0]
xdb panic: Internal Error (IE571) (0, 10)   When I try to access the structure
                                            elements xdb panics.
>
>p element[63]                              If I just print the structure it
                                            works.
0x86b7c  struct {
    number = 64;
    node = 0x86b80;
    neighbors = 0x86ba0;
    split_number = 0x86bb0;
    split = 1;
    split_previous = 0;
    brothers = 9;
    father = 14;
    old_elem = 0;
}
>
>p element[63].number                       It does not work again!
xdb panic: Internal Error (IE571) (0, 10)
>

I hope you can get something out of that.
Thanks.
				Fernando

-------------------------------------------------------------------------------
-- 
             Rich Stoler, Senior Systems Prgrammer,
	       	  George Washington University
     SEAS Computing Facility, 725 23rd St NW, Washington DC 20052
 	     stoler@seas.gwu.edu  -or-  uunet!gwusun!stoler
Newsgroups: comp.sys.hp