cvs commit: src/sys/amd64/amd64 dump_machdep.c src/sys/i386/i386 dump_machdep.c src/sys/ia64/ia64 dump_machdep.c

Marcel Moolenaar marcel at
Sat Jul 2 19:57:31 GMT 2005

marcel      2005-07-02 19:57:31 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      dump_machdep.c 
    sys/i386/i386        dump_machdep.c 
    sys/ia64/ia64        dump_machdep.c 
  Fix a buglet that was present in the ia64 code and that got inherited
  by amd64 and i386: For buffered writes we collect data and write it
  out a ${DEV_BSIZE}-sized block at a time. The fragsz variable is used
  to keep track of how much data we have collected in the buffer so far
  and it's reset to zero immediately after writing a block to the dump
  When the last, possibly partially filled buffer is flushed, we didn't
  reset fragsz to 0 and as such would stop reflecting reality. Since we
  currently only need to do buffered writes once, this isn't a problem.
  However, when kernel dumps are made by hand (say by callling doadump
  from within DDB), the improperly cleared state from the first call to
  dumpsys causes the next call to dumpsys to create an invalid code file.
  This change resets fragsz after flushing the partially filled buffer so
  that it fixes the two problems at once.
  Approved by: re (scottl)
  Revision  Changes    Path
  1.11      +1 -0      src/sys/amd64/amd64/dump_machdep.c
  1.11      +1 -0      src/sys/i386/i386/dump_machdep.c
  1.13      +1 -0      src/sys/ia64/ia64/dump_machdep.c

More information about the cvs-src mailing list