summaryrefslogtreecommitdiffstats
path: root/tdecore/kdebug.cpp
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2025-08-09 08:49:12 +0300
committerAlexander Golubev <fatzer2@gmail.com>2025-08-10 10:11:19 +0300
commit7bfcba48321184ee4cd4c5485196ca59b4a3a37f (patch)
tree3896a1b32b2e0d8260ae1cafa6ffa75fa419fe60 /tdecore/kdebug.cpp
parentdd898a208cf799d893bd9099fde63b1843bc88af (diff)
downloadtdelibs-7bfcba48.tar.gz
tdelibs-7bfcba48.zip
Fix build WITH_LIBBFD and libbfd 2.34+
Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/issues/368 Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 0a9401e9c5afd3504162aab918ad84fa279a140b)
Diffstat (limited to 'tdecore/kdebug.cpp')
-rw-r--r--tdecore/kdebug.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp
index aaf4edb1d..d6b29c799 100644
--- a/tdecore/kdebug.cpp
+++ b/tdecore/kdebug.cpp
@@ -693,10 +693,15 @@ void bfdFillAdditionalFunctionsInfo(BacktraceFunctionInfo &func) {
// found source file and line for given address
for (asection *sect = abfd->sections; sect != NULL; sect = sect->next) {
-
+#ifdef HAVE_LIBBFD_2_34_API
+ if (bfd_section_flags(sect) & SEC_ALLOC) {
+ bfd_vma sectStart = bfd_section_vma(sect);
+ bfd_vma sectEnd = sectStart + bfd_section_size(sect);
+#else // HAVE_LIBBFD_2_34_API
if (bfd_get_section_flags(abfd, sect) & SEC_ALLOC) {
bfd_vma sectStart = bfd_get_section_vma(abfd, sect);
bfd_vma sectEnd = sectStart + bfd_section_size(abfd, sect);
+#endif // HAVE_LIBBFD_2_34_API
if (sectStart <= func.offset && func.offset < sectEnd) {
bfd_vma sectOffset = func.offset - sectStart;
const char* functionName;