cvs commit: src/contrib/gdb-6/gdb i386-tdep.c

Simon Schubert corecode at crater.dragonflybsd.org
Wed Feb 13 16:25:45 PST 2008


corecode    2008/02/13 16:24:24 PST

DragonFly src repository

  Modified files:
    contrib/gdb-6/gdb    i386-tdep.c 
  Log:
  Fix incomplete stack traces by gdb.
  
  Gdb tries unwinding a stack frame by analyzing the function prologue.
  If it can not find the beginning of the function, which happens for
  stripped binaries, etc., it will resort to guessing.  It then assumes
  that the function is a frame-less function without any local stack
  variables.  This of course is wrong for almost all functions.
  
  We work around this problem by assuming a valid stack frame.
  
  Previous versions of gdb were broken the same way, but libbfd would
  actually compensate with another bug which would simply report a wrong
  function start address -- the address of a preceding, known function.
  Because most functions indeed use a proper stack frame, this would
  trick gdb into doing the unwinding properly.
  
  Revision  Changes    Path
  1.2       +10 -0     src/contrib/gdb-6/gdb/i386-tdep.c


http://www.dragonflybsd.org/cvsweb/src/contrib/gdb-6/gdb/i386-tdep.c.diff?r1=1.1&r2=1.2&f=u





More information about the Commits mailing list