Commit a1466d1e authored by unknown's avatar unknown

fixed bug #1661 Compiling --pstack fails with binutils 2.13.90

fixed wrong execution of bfd_get_symtab_upper_bound in pstack/pstack.c
for files which don't contain symbols..
to avoid failing of new binutils (old binutils returned 0 in this case)


pstack/pstack.c:
  fixed bug #1661 Compiling --pstack fails with binutils 2.13.90
  
  fixed wrong execution of bfd_get_symtab_upper_bound 
  for files which don't contain symbols..
  to avoid failing of new binutils (old binutils returned 0 in this case)
parent ae8e10d6
...@@ -2667,7 +2667,8 @@ pstack_install_segv_action( const char* path_format_) ...@@ -2667,7 +2667,8 @@ pstack_install_segv_action( const char* path_format_)
if ((abfd = load_bfd(pid))==0) if ((abfd = load_bfd(pid))==0)
fprintf(stderr, "BFD load failed..\n"); fprintf(stderr, "BFD load failed..\n");
else { else {
long storage_needed = bfd_get_symtab_upper_bound (abfd); long storage_needed= (bfd_get_file_flags(abfd) & HAS_SYMS) ?
bfd_get_symtab_upper_bound (abfd) : 0;
long i; long i;
(void)i; (void)i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment