* dwarf2read.c: Don't include zlib.h or sys/mman.h.
authorTom Tromey <tromey@redhat.com>
Wed, 18 Jul 2012 19:57:21 +0000 (19:57 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 18 Jul 2012 19:57:21 +0000 (19:57 +0000)
commit4bf44c1cf1abad13fcda09e20983757f175c6dca
treecdf42085d3145af5f039d7783b63f6ce4d622a32
parentbb39779773bd297e43c409d2643e787aaeb6c3e1
* dwarf2read.c: Don't include zlib.h or sys/mman.h.
(pagesize): Remove.
(struct dwarf2_section_info) <map_addr, map_len>: Remove.
(zlib_decompress_section): Remove.
(dwarf2_read_section): Use gdb_bfd_map_section.
(munmap_section_buffer): Remove.
(free_dwo_file, dwarf2_per_objfile_free): Don't use
munmap_section_buffer.
* gdb_bfd.c: Include zlib.h, sys/mman.h.
(struct gdb_bfd_section_data): New.
(free_one_bfd_section): New function.
(gdb_bfd_close_or_warn): Use free_one_bfd_section.
(get_section_descriptor, zlib_decompress_section)
(gdb_bfd_map_section): New functions.
* gdb_bfd.h (gdb_bfd_map_section): Declare.
gdb/ChangeLog
gdb/dwarf2read.c
gdb/gdb_bfd.c
gdb/gdb_bfd.h