mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 00:28:20 +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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user