[GLLUG] Debugging executables that act weird

Adam McDougall mcdouga9@egr.msu.edu
Tue, 19 Feb 2002 16:55:19 -0500


On Tue, Feb 19, 2002 at 04:50:25PM -0500, Edward Glowacki wrote:

  I'm trying to debug some software here and I've encountered an
  interesting phenomenon.  Everywhere else, the software works fine, but
  on every FreeBSD machine I have ever installed, it doesn't work
  correctly.  The executable runs fine (as in it actually runs, does not
  dump core, and exits normally), but apparently doesn't get any data back
  from some subroutine (judging by very limited access to the source
  code), so it spits out an error message and exits.  
  
  I've tried everything I can think of, including checking the kernel and
  all the boot sequence stuff for anything unusual, and compared my setups
  to those of a working machine, even recompiling the binary from source
  on my machine (which *seemed* to work OK, BTW).  Everything *seems*
  nominal.  My only thought now is maybe somewhere I have a different
  library or didn't install some snippet of code that the program
  requires.
  
  What I'm wondering is if there is any good way (with GDB maybe?) to
  examine what shared libraries the program is trying to load.  Or
  frankly, any other suggestions you may have as to how to debug this damn
  thing would be more than welcome.

ldd will show what libraries it is linked to, but it may be able to dlopen()
more I think.  Also, ktrace and truss may help you to figure out what it is
doing.  truss shows system calls on the output, and ktrace dumps info to a 
file you use kdump to view.

  
  Thanks,
  ED
  
  -- 
  Edward Glowacki				glowack2@msu.edu
  GLLUG Peon  				http://www.gllug.org
  Imagination is the one weapon in the war against reality.
                  -- Jules de Gaultier
  
  _______________________________________________
  linux-user mailing list
  linux-user@egr.msu.edu
  http://www.egr.msu.edu/mailman/listinfo/linux-user