• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/gdb/
1<html lang="en">
2<head>
3<title>Blocks In Python - Debugging with GDB</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="Debugging with GDB">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="index.html#Top">
8<link rel="up" href="Python-API.html#Python-API" title="Python API">
9<link rel="prev" href="Frames-In-Python.html#Frames-In-Python" title="Frames In Python">
10<link rel="next" href="Symbols-In-Python.html#Symbols-In-Python" title="Symbols In Python">
11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
12<!--
13Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
15Free Software Foundation, Inc.
16
17Permission is granted to copy, distribute and/or modify this document
18under the terms of the GNU Free Documentation License, Version 1.3 or
19any later version published by the Free Software Foundation; with the
20Invariant Sections being ``Free Software'' and ``Free Software Needs
21Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
22and with the Back-Cover Texts as in (a) below.
23
24(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
25this GNU Manual.  Buying copies from GNU Press supports the FSF in
26developing GNU and promoting software freedom.''-->
27<meta http-equiv="Content-Style-Type" content="text/css">
28<style type="text/css"><!--
29  pre.display { font-family:inherit }
30  pre.format  { font-family:inherit }
31  pre.smalldisplay { font-family:inherit; font-size:smaller }
32  pre.smallformat  { font-family:inherit; font-size:smaller }
33  pre.smallexample { font-size:smaller }
34  pre.smalllisp    { font-size:smaller }
35  span.sc    { font-variant:small-caps }
36  span.roman { font-family:serif; font-weight:normal; } 
37  span.sansserif { font-family:sans-serif; font-weight:normal; } 
38--></style>
39<link rel="stylesheet" type="text/css" href="../cs.css">
40</head>
41<body>
42<div class="node">
43<a name="Blocks-In-Python"></a>
44<p>
45Next:&nbsp;<a rel="next" accesskey="n" href="Symbols-In-Python.html#Symbols-In-Python">Symbols In Python</a>,
46Previous:&nbsp;<a rel="previous" accesskey="p" href="Frames-In-Python.html#Frames-In-Python">Frames In Python</a>,
47Up:&nbsp;<a rel="up" accesskey="u" href="Python-API.html#Python-API">Python API</a>
48<hr>
49</div>
50
51<h5 class="subsubsection">23.2.2.16 Accessing frame blocks from Python.</h5>
52
53<p><a name="index-blocks-in-python-1833"></a><a name="index-gdb_002eBlock-1834"></a>
54Within each frame, <span class="sc">gdb</span> maintains information on each block
55stored in that frame.  These blocks are organized hierarchically, and
56are represented individually in Python as a <code>gdb.Block</code>. 
57Please see <a href="Frames-In-Python.html#Frames-In-Python">Frames In Python</a>, for a more in-depth discussion on
58frames.  Furthermore, see <a href="Stack.html#Stack">Examining the Stack</a>, for more
59detailed technical information on <span class="sc">gdb</span>'s book-keeping of the
60stack.
61
62   <p>The following block-related functions are available in the <code>gdb</code>
63module:
64
65   <p><a name="index-gdb_002eblock_005ffor_005fpc-1835"></a>
66
67<div class="defun">
68&mdash; Function: <b>block_for_pc</b><var> pc<a name="index-block_005ffor_005fpc-1836"></a></var><br>
69<blockquote><p>Return the <code>gdb.Block</code> containing the given <var>pc</var> value.  If the
70block cannot be found for the <var>pc</var> value specified, the function
71will return <code>None</code>. 
72</p></blockquote></div>
73
74   <p>A <code>gdb.Block</code> object has the following attributes:
75
76     <dl>
77
78     <div class="defun">
79&mdash; Instance Variable of Block: <b>start</b><var><a name="index-start-1837"></a></var><br>
80<blockquote> <p>The start address of the block.  This attribute is not writable. 
81</p></blockquote></div>
82
83     <div class="defun">
84&mdash; Instance Variable of Block: <b>end</b><var><a name="index-end-1838"></a></var><br>
85<blockquote> <p>The end address of the block.  This attribute is not writable. 
86</p></blockquote></div>
87
88     <div class="defun">
89&mdash; Instance Variable of Block: <b>function</b><var><a name="index-function-1839"></a></var><br>
90<blockquote> <p>The name of the block represented as a <code>gdb.Symbol</code>.  If the
91block is not named, then this attribute holds <code>None</code>.  This
92attribute is not writable. 
93</p></blockquote></div>
94
95     <div class="defun">
96&mdash; Instance Variable of Block: <b>superblock</b><var><a name="index-superblock-1840"></a></var><br>
97<blockquote> <p>The block containing this block.  If this parent block does not exist,
98this attribute holds <code>None</code>.  This attribute is not writable. 
99</p></blockquote></div>
100     </dl>
101
102   </body></html>
103
104