Changes between Version 1 and Version 2 of TBR/Review/Debugging/Start
- Timestamp:
- 10/04/05 19:49:01 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TBR/Review/Debugging/Start
v1 v2 48 48 49 49 {{{ 50 (gdb) p '''((Region''Control ''')''Region''Information->local''table<nowiki>[</nowiki>1])->Memory->first51 $9 <tt> {back''flag </tt> 1, front''flag <tt> 8058280, next </tt> 0x7ea5b4, previous =0x7ea5b0}50 (gdb) p ((Region_Control *)_Region_Information->local_table[1])->Memory->first 51 $9 {back_flag=1, front_flag=8058280, next=0x7ea5b4, previous=0x7ea5b0} 52 52 }}} 53 53 54 54 Let's look at that gdb command in more detail. 55 55 56 * '' Region''Information_contains the information used to manage Region objects.57 * '' Region''Information->local_tableis the object pointer table for Regions. It is56 * ''_Region_Information'' contains the information used to manage Region objects. 57 * ''_Region_Information->local_table'' is the object pointer table for Regions. It is 58 58 indexed by the ''object index'' portion of the object ID. 59 * ''Region ''Information->local''table<nowiki>[</nowiki>1] points to the first Region object. It is of type ''(Region''Control *)''.60 * ((Region''Control *)''Region''Information->local''table<nowiki>[</nowiki>1])->Memorypoints to the Heap control portion of this Region's control block.61 * '' '((Region''Control ''')''Region''Information->local''table<nowiki>[</nowiki>1])->Memory->firstreferences the contents of the first ''heap block'' on this Heap.59 * ''Region_Information->local_table'' points to the first Region object. It is of type ''(Region_Control *)''. 60 * ''((Region_Control *)_Region_Information->local_table[1])->Memory'' points to the Heap control portion of this Region's control block. 61 * ''((Region_Control *)_Region_Information->local_table[1])->Memory->first'' references the contents of the first ''heap block'' on this Heap. 62 62 63 Notice that the ''front ''flag'' is displayed as ''8058280''. This is in decimal since we used ''p'' not ''p/x'' to gdb. Since this number is even, we know the ''in use bit_is 0 and the block is free. Thus the first block on the heap is 8,058,280 bytes and there are at least that many bytes left.63 Notice that the ''front_flag'' is displayed as ''8058280''. This is in decimal since we used ''p'' not ''p/x'' to gdb. Since this number is even, we know the in use bit is 0 and the block is free. Thus the first block on the heap is 8,058,280 bytes and there are at least that many bytes left. 64 64 65 65 '''NOTE:''' This is really a crude estimate. … … 114 114 $free, $numfree 115 115 end 116 117 116 = How much memory is left in the RTEMS Workspace? = 118 117