|
27 | 27 | local arrays |
28 | 28 | @see jitreader |
29 | 29 |
|
30 | | - But the libdwarf feature can be useful in a variety of |
| 30 | + But the @e libdwarf feature can be useful in a variety of |
31 | 31 | circumstances. |
32 | 32 |
|
33 | 33 | For example, the DWARF data were kept |
|
47 | 47 | a small handful of functions and supply |
48 | 48 | function pointers and code implementing the |
49 | 49 | functions. These are part of your application |
50 | | - or library, not part of libdwarf. |
| 50 | + or library, not part of @e libdwarf. |
51 | 51 | Your code accesses the data in whatever way |
52 | 52 | applies and you write code that provides |
53 | | - the interfaces so standard libdwarf can access |
| 53 | + the interfaces so standard @e libdwarf can access |
54 | 54 | your DWARF content. |
55 | 55 |
|
56 | 56 | You set up a little bit of data with that code |
57 | 57 | (described below) |
58 | 58 | and then you have essentially written the |
59 | 59 | dwarf_init_path equivalent and you can access |
60 | 60 | compilation units, line tables etc and |
61 | | - the standard libdwarf function calls simply work. |
| 61 | + the standard @e libdwarf function calls simply work. |
62 | 62 |
|
63 | 63 | Data you need to create involves the following types. |
64 | 64 | What follows describes how to fill them in |
|
126 | 126 |
|
127 | 127 | @b ai_object |
128 | 128 |
|
129 | | - Allocate a local struct (libdwarf will not |
| 129 | + Allocate a local struct (@e libdwarf will not |
130 | 130 | touch this struct and will not know |
131 | 131 | anything of its contents). You will need one |
132 | 132 | of these for each Dwarf_Debug you open. |
|
150 | 150 | @b Dwarf_Obj_Access_Section_a: |
151 | 151 |
|
152 | 152 | The set of fields here is a set that is sufficient |
153 | | - to describe a single object section to libdwarf. |
| 153 | + to describe a single object section to @e libdwarf. |
154 | 154 | Your implementation of a @b om_get_section_info |
155 | 155 | must simply fill in a few fields (leaving most zero) |
156 | | - for libdwarf for the section indexed. |
| 156 | + for @e libdwarf for the section indexed. |
157 | 157 | The fields here are standard Elf, |
158 | 158 | and for most you can just fill in the value zero. |
159 | 159 | For section index zero as_name should be set to |
|
174 | 174 | @b as_offset: Just fill in zero. |
175 | 175 |
|
176 | 176 | @b as_size: Fill in the size, in bytes, |
177 | | - of the section you are telling libdwarf about. |
| 177 | + of the section you are telling @e libdwarf about. |
178 | 178 |
|
179 | 179 | @b as_link: Just fill in zero. |
180 | 180 |
|
|
188 | 188 |
|
189 | 189 | @b struct Dwarf_Obj_Access_Methods_a_s: |
190 | 190 |
|
191 | | - The functions libdwarf needs to access object data |
| 191 | + The functions @e libdwarf needs to access object data |
192 | 192 | are declared here. |
193 | 193 | Usually the struct is statically defined |
194 | 194 | and the function pointers are set at |
|
201 | 201 | which is a struct you define to hold data you need |
202 | 202 | to implement this set of functions. You refer to |
203 | 203 | it |
204 | | - When libdwarf calls your set of functions (these |
| 204 | + When @e libdwarf calls your set of functions (these |
205 | 205 | described now) it passes the ai_object pointer |
206 | 206 | you provided to these functions as @b obj parameter . |
207 | 207 |
|
208 | | - This is the final part of your work for libdwarf. |
| 208 | + This is the final part of your work for @e libdwarf. |
209 | 209 | In the source file with your code you will be |
210 | 210 | allocating data, making a provision for |
211 | 211 | an array (real or conceptual) for per-section data, |
212 | | - and returning values libdwarf needs. |
| 212 | + and returning values @e libdwarf needs. |
213 | 213 | Note that the section array should include |
214 | 214 | an index zero with all zero field values. |
215 | 215 | That means interesting fields start with index one. |
|
240 | 240 | Return |
241 | 241 | DW_DLV_OK - Everything ok. |
242 | 242 | DW_DLV_ERROR - Error occurred. Use 'error' to determine the |
243 | | - libdwarf defined error. |
| 243 | + @e libdwarf defined error. |
244 | 244 | DW_DLV_NO_ENTRY - No such section. |
245 | 245 | @endcode |
246 | 246 |
|
|
268 | 268 |
|
269 | 269 | @code |
270 | 270 | Get the size of a length field in the underlying object file. |
271 | | - libdwarf currently supports * 4 and 8 byte sizes, but may |
| 271 | + @e libdwarf currently supports * 4 and 8 byte sizes, but may |
272 | 272 | support larger in the future. |
273 | 273 | Perhaps the return type should be an enumeration? |
274 | 274 |
|
|
286 | 286 |
|
287 | 287 | @code |
288 | 288 | Get the size of a pointer field in the underlying object file. |
289 | | - libdwarf currently supports 4 and 8 byte sizes. |
| 289 | + @e libdwarf currently supports 4 and 8 byte sizes. |
290 | 290 | Perhaps the return type should be an enumeration? |
291 | 291 |
|
292 | 292 | Return |
|
303 | 303 | obj - Your data |
304 | 304 |
|
305 | 305 | Return |
306 | | - Must return a value at least as large as any section libdwarf |
| 306 | + Must return a value at least as large as any section @e libdwarf |
307 | 307 | might read. Returns a value that is a sanity check on |
308 | | - offsets libdwarf reads for this DWARF set. It need not be |
| 308 | + offsets @e libdwarf reads for this DWARF set. It need not be |
309 | 309 | a tight bound. |
310 | 310 | @endcode |
311 | 311 |
|
|
0 commit comments