vg_symtab2.c:
    - Can now handle file sizes > 65536 lines, despite the stabs format only
      storing line numbers in a short.  Do this heuristically, by looking for
      line number sequences that go from 65000-odd to 0-odd within the same
      file.

      This required changing the RiLoc.lineno field to 20 bytes, which gives a
      maximum file length of 1,000,000-odd lines, whichs seems reasonable.

      In order to keep RiLoc at 12 bytes (important because there are lots of
      them) this required stealing four bits from the RiLoc.size field,
      reducing it to 12 bits.  This isn't too bad because the size is unlikely
      to be larger than 4096 bytes -- we were already ignoring any ones larger
      than 10,000 bytes because they were suspicious anyway (and see next
      point).

    - Tightened up the sanity checking on line address ranges.  Previously any
      range that looked suspicious (eg. > 10000 bytes, or not within the bound
      of the segment info) was simply ignored(!)  Now it prints a warning when
      this happens and truncates the size to 1 to be safe;  also there are some
      extra assertions for totally space-cadet numbers.

      (At first these checks were all assertions, but I tried a version of GNU
      gas that produces a small handful of dodgy stabs entries;  warnings
      seemed a reasonable compromise.)

vg_cachesim.c:
    - Removed the requirement that both types of cost centre (iCC, idCC) have
      instr_addr as their second word.  Less fragile -- now the only
      requirement is that they both have their type tag as their first byte.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@197 a5019735-40e9-0310-863c-91ae7b9d1cf9
4 files changed