OLD | NEW |
1 /* Definitions for symbol file management in GDB. | 1 /* Definitions for symbol file management in GDB. |
2 | 2 |
3 Copyright (C) 1992-2004, 2007-2012 Free Software Foundation, Inc. | 3 Copyright (C) 1992-2004, 2007-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 /* Per objfile data-pointers required by other GDB modules. */ | 321 /* Per objfile data-pointers required by other GDB modules. */ |
322 /* FIXME: kettenis/20030711: This mechanism could replace | 322 /* FIXME: kettenis/20030711: This mechanism could replace |
323 deprecated_sym_stab_info and deprecated_sym_private | 323 deprecated_sym_stab_info and deprecated_sym_private |
324 entirely. */ | 324 entirely. */ |
325 | 325 |
326 void **data; | 326 void **data; |
327 unsigned num_data; | 327 unsigned num_data; |
328 | 328 |
329 /* Set of relocation offsets to apply to each section. | 329 /* Set of relocation offsets to apply to each section. |
330 Currently on the objfile_obstack (which makes no sense, but I'm | 330 The table is indexed by the_bfd_section->index, thus it is generally |
331 not sure it's harming anything). | 331 as large as the number of sections in the binary. |
| 332 The table is stored on the objfile_obstack. |
332 | 333 |
333 These offsets indicate that all symbols (including partial and | 334 These offsets indicate that all symbols (including partial and |
334 minimal symbols) which have been read have been relocated by this | 335 minimal symbols) which have been read have been relocated by this |
335 much. Symbols which are yet to be read need to be relocated by | 336 much. Symbols which are yet to be read need to be relocated by it. */ |
336 it. */ | |
337 | 337 |
338 struct section_offsets *section_offsets; | 338 struct section_offsets *section_offsets; |
339 int num_sections; | 339 int num_sections; |
340 | 340 |
341 /* Indexes in the section_offsets array. These are initialized by the | 341 /* Indexes in the section_offsets array. These are initialized by the |
342 *_symfile_offsets() family of functions (som_symfile_offsets, | 342 *_symfile_offsets() family of functions (som_symfile_offsets, |
343 xcoff_symfile_offsets, default_symfile_offsets). In theory they | 343 xcoff_symfile_offsets, default_symfile_offsets). In theory they |
344 should correspond to the section indexes used by bfd for the | 344 should correspond to the section indexes used by bfd for the |
345 current objfile. The exception to this for the time being is the | 345 current objfile. The exception to this for the time being is the |
346 SOM version. */ | 346 SOM version. */ |
347 | 347 |
348 int sect_index_text; | 348 int sect_index_text; |
349 int sect_index_data; | 349 int sect_index_data; |
350 int sect_index_bss; | 350 int sect_index_bss; |
351 int sect_index_rodata; | 351 int sect_index_rodata; |
352 | 352 |
353 /* These pointers are used to locate the section table, which | 353 /* These pointers are used to locate the section table, which |
354 among other things, is used to map pc addresses into sections. | 354 among other things, is used to map pc addresses into sections. |
355 SECTIONS points to the first entry in the table, and | 355 SECTIONS points to the first entry in the table, and |
356 SECTIONS_END points to the first location past the last entry | 356 SECTIONS_END points to the first location past the last entry |
357 in the table. Currently the table is stored on the | 357 in the table. The table is stored on the objfile_obstack. |
358 objfile_obstack (which makes no sense, but I'm not sure it's | 358 There is no particular order to the sections in this table, and it |
359 harming anything). */ | 359 only contains sections we care about (e.g. non-empty, SEC_ALLOC). */ |
360 | 360 |
361 struct obj_section | 361 struct obj_section *sections, *sections_end; |
362 *sections, *sections_end; | |
363 | 362 |
364 /* GDB allows to have debug symbols in separate object files. This is | 363 /* GDB allows to have debug symbols in separate object files. This is |
365 used by .gnu_debuglink, ELF build id note and Mach-O OSO. | 364 used by .gnu_debuglink, ELF build id note and Mach-O OSO. |
366 Although this is a tree structure, GDB only support one level | 365 Although this is a tree structure, GDB only support one level |
367 (ie a separate debug for a separate debug is not supported). Note that | 366 (ie a separate debug for a separate debug is not supported). Note that |
368 separate debug object are in the main chain and therefore will be | 367 separate debug object are in the main chain and therefore will be |
369 visited by ALL_OBJFILES & co iterators. Separate debug objfile always | 368 visited by ALL_OBJFILES & co iterators. Separate debug objfile always |
370 has a non-nul separate_debug_objfile_backlink. */ | 369 has a non-nul separate_debug_objfile_backlink. */ |
371 | 370 |
372 /* Link to the first separate debug object, if any. */ | 371 /* Link to the first separate debug object, if any. */ |
373 struct objfile *separate_debug_objfile; | 372 struct objfile *separate_debug_objfile; |
374 | 373 |
375 /* If this is a separate debug object, this is used as a link to the | 374 /* If this is a separate debug object, this is used as a link to the |
376 actual executable objfile. */ | 375 actual executable objfile. */ |
377 struct objfile *separate_debug_objfile_backlink; | 376 struct objfile *separate_debug_objfile_backlink; |
378 | 377 |
379 /* If this is a separate debug object, this is a link to the next one | 378 /* If this is a separate debug object, this is a link to the next one |
380 for the same executable objfile. */ | 379 for the same executable objfile. */ |
381 struct objfile *separate_debug_objfile_link; | 380 struct objfile *separate_debug_objfile_link; |
382 | 381 |
383 /* Place to stash various statistics about this objfile. */ | 382 /* Place to stash various statistics about this objfile. */ |
384 OBJSTATS; | 383 OBJSTATS; |
385 | 384 |
386 /* A linked list of symbols created when reading template types or | 385 /* A linked list of symbols created when reading template types or |
387 function templates. These symbols are not stored in any symbol | 386 function templates. These symbols are not stored in any symbol |
388 table, so we have to keep them here to relocate them | 387 table, so we have to keep them here to relocate them |
389 properly. */ | 388 properly. */ |
390 struct symbol *template_symbols; | 389 struct symbol *template_symbols; |
391 }; | 390 }; |
392 | 391 |
393 /* Defines for the objfile flag word. */ | 392 /* Defines for the objfile flag word. */ |
394 | 393 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 extern struct objfile *allocate_objfile (bfd *, int); | 442 extern struct objfile *allocate_objfile (bfd *, int); |
444 | 443 |
445 extern struct gdbarch *get_objfile_arch (struct objfile *); | 444 extern struct gdbarch *get_objfile_arch (struct objfile *); |
446 | 445 |
447 extern void init_entry_point_info (struct objfile *); | 446 extern void init_entry_point_info (struct objfile *); |
448 | 447 |
449 extern int entry_point_address_query (CORE_ADDR *entry_p); | 448 extern int entry_point_address_query (CORE_ADDR *entry_p); |
450 | 449 |
451 extern CORE_ADDR entry_point_address (void); | 450 extern CORE_ADDR entry_point_address (void); |
452 | 451 |
453 extern int build_objfile_section_table (struct objfile *); | 452 extern void build_objfile_section_table (struct objfile *); |
454 | 453 |
455 extern void terminate_minimal_symbol_table (struct objfile *objfile); | 454 extern void terminate_minimal_symbol_table (struct objfile *objfile); |
456 | 455 |
457 extern struct objfile *objfile_separate_debug_iterate (const struct objfile *, | 456 extern struct objfile *objfile_separate_debug_iterate (const struct objfile *, |
458 const struct objfile *); | 457 const struct objfile *); |
459 | 458 |
460 extern void put_objfile_before (struct objfile *, struct objfile *); | 459 extern void put_objfile_before (struct objfile *, struct objfile *); |
461 | 460 |
462 extern void objfile_to_front (struct objfile *); | 461 extern void objfile_to_front (struct objfile *); |
463 | 462 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 extern const struct objfile_data *register_objfile_data_with_cleanup | 515 extern const struct objfile_data *register_objfile_data_with_cleanup |
517 (void (*save) (struct objfile *, void *), | 516 (void (*save) (struct objfile *, void *), |
518 void (*free) (struct objfile *, void *)); | 517 void (*free) (struct objfile *, void *)); |
519 | 518 |
520 extern void clear_objfile_data (struct objfile *objfile); | 519 extern void clear_objfile_data (struct objfile *objfile); |
521 extern void set_objfile_data (struct objfile *objfile, | 520 extern void set_objfile_data (struct objfile *objfile, |
522 const struct objfile_data *data, void *value); | 521 const struct objfile_data *data, void *value); |
523 extern void *objfile_data (struct objfile *objfile, | 522 extern void *objfile_data (struct objfile *objfile, |
524 const struct objfile_data *data); | 523 const struct objfile_data *data); |
525 | 524 |
error: old chunk mismatch |
None
OLD | NEW |