From 778065506f636d4f6253033749adacf5c5d86a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Mon, 28 Feb 2005 07:14:03 +0000 Subject: [PATCH] change in getting section size for SUN Solaris (old bfd.h) --- mrw/stacktrace.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mrw/stacktrace.cpp b/mrw/stacktrace.cpp index 260c3d0..ded8a0f 100644 --- a/mrw/stacktrace.cpp +++ b/mrw/stacktrace.cpp @@ -9,6 +9,9 @@ @license LGPL, see file COPYING $Log$ + Revision 1.12 2005/02/28 07:14:03 marc + change in getting section size for SUN Solaris (old bfd.h) + Revision 1.11 2005/02/18 15:48:56 marc Dynamic loading of libbfd, no more dependency on specific libbfd version! @@ -330,7 +333,13 @@ void mrw::StackTrace::buildSectionMap(bfd* abfd, asection* section, *(std::pair*)fileoffs; bfd_vma vma(bfd_get_section_vma(abfd, section)+ reinterpret_cast(fileoffset.second)); +#ifdef bfd_get_section_size bfd_size_type sz(bfd_get_section_size(section)); +#elsifdef bfd_get_section_size_before_reloc + bfd_size_type sz(bfd_get_section_size_before_reloc(section)); +#else + bfd_size_type sz(section->size); +#endif _dic[fileoffset.first][vma] = Translator::mapped_type(vma+sz, section); _addrs[vma] = fileoffset.first; }