diff options
author | Tristan Gingold <gingold@adacore.com> | 2011-05-24 12:40:17 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2011-05-24 12:40:17 +0000 |
commit | 3017a003674a2cf413b3522a5875ce26fcd574c2 (patch) | |
tree | c0d0b52709275aa88b5f3ec73b98af9c903123f1 /gdb/dwarf2read.c | |
parent | ee5683ab05022bd68d5200b74cf00def28785076 (diff) | |
download | gdb-3017a003674a2cf413b3522a5875ce26fcd574c2.zip gdb-3017a003674a2cf413b3522a5875ce26fcd574c2.tar.gz gdb-3017a003674a2cf413b3522a5875ce26fcd574c2.tar.bz2 |
2011-05-24 Tristan Gingold <gingold@adacore.com>
* symfile.h (enum dwarf2_section_enum): New type.
(dwarf2_get_section_info): New prototype.
* dwarf2read.c (dwarf2_get_section_info): Replace parameter
section_name by sect. Use a switch to select the info.
* dwarf2-frame.c (warf2_get_section_info): Remove prototype.
(dwarf2_build_frame_info): Adjust calls to dwarf2_get_section_info.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 65317d4..2f4d1ae 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1633,7 +1633,8 @@ dwarf2_section_size (struct objfile *objfile, SECTION_NAME. */ void -dwarf2_get_section_info (struct objfile *objfile, const char *section_name, +dwarf2_get_section_info (struct objfile *objfile, + enum dwarf2_section_enum sect, asection **sectp, gdb_byte **bufp, bfd_size_type *sizep) { @@ -1650,12 +1651,17 @@ dwarf2_get_section_info (struct objfile *objfile, const char *section_name, *sizep = 0; return; } - if (section_is_p (section_name, EH_FRAME_SECTION)) - info = &data->eh_frame; - else if (section_is_p (section_name, FRAME_SECTION)) - info = &data->frame; - else - gdb_assert_not_reached ("unexpected section"); + switch (sect) + { + case DWARF2_DEBUG_FRAME: + info = &data->frame; + break; + case DWARF2_EH_FRAME: + info = &data->eh_frame; + break; + default: + gdb_assert_not_reached ("unexpected section"); + } dwarf2_read_section (objfile, info); |