mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[common] fix build for newer versions of binutils
binutils has changed several macros. Added ifdef to allow building with stable and bleeding edge versions. refs #232
This commit is contained in:
parent
582ed6b5d1
commit
2440272307
@ -98,10 +98,18 @@ static void load_symbols()
|
||||
|
||||
static bool lookup_address(bfd_vma pc, const char ** filename, const char ** function, unsigned int * line, unsigned int * discriminator)
|
||||
{
|
||||
#ifdef bfd_get_section_flags
|
||||
if ((bfd_get_section_flags(crash.fd, crash.section) & SEC_ALLOC) == 0)
|
||||
#else
|
||||
if ((bfd_section_flags(crash.section) & SEC_ALLOC) == 0)
|
||||
#endif
|
||||
return false;
|
||||
|
||||
#ifdef bfd_get_section_size
|
||||
bfd_size_type size = bfd_get_section_size(crash.section);
|
||||
#else
|
||||
bfd_size_type size = bfd_section_size(crash.section);
|
||||
#endif
|
||||
if (pc >= size)
|
||||
return false;
|
||||
|
||||
@ -230,4 +238,4 @@ bool installCrashHandler(const char * exe)
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user