This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix logic error in legach_svr4_fetch_link_map_offsets



My own mistake -- too many elses.  For a 64-bit target, this 
function doesn't have a valid return path, and falls off the 
end without returning anything.

2002-02-07  Michael Snyder  <msnyder@redhat.com>

	* solib-legacy.c (legacy_svr4_fetch_link_map_offsets): 
	Logic bug, remove misplaced else.

Index: solib-legacy.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-legacy.c,v
retrieving revision 1.4
diff -p -r1.4 solib-legacy.c
*** solib-legacy.c	2002/01/07 19:45:14	1.4
--- solib-legacy.c	2002/02/07 23:00:14
*************** legacy_svr4_fetch_link_map_offsets (void
*** 135,145 ****
        if (bfd_get_arch_size (exec_bfd) == 32)
  	return lmp32;
      }
!   else if (TARGET_PTR_BIT == 32)
      return lmp32;
-   else
  #endif
!     return lmp;
  }
  
  #endif /* HAVE_LINK_H */
--- 135,144 ----
        if (bfd_get_arch_size (exec_bfd) == 32)
  	return lmp32;
      }
!   if (TARGET_PTR_BIT == 32)
      return lmp32;
  #endif
!   return lmp;
  }
  
  #endif /* HAVE_LINK_H */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]