• Home
  • History
  • Annotate
Name
Date
Size
#Lines
LOC

..--

README.txtD22-Nov-20232 KiB5839

UNUSED_STABS.txtD22-Nov-202338.5 KiB1,4841,176

d3basics.cD22-Nov-202345.9 KiB1,222998

debuginfo.cD22-Nov-2023135.9 KiB4,0192,689

image.cD22-Nov-202335 KiB1,046762

lzoconf.hD22-Nov-202314.9 KiB447280

lzodefs.hD22-Nov-202366.8 KiB1,8531,805

minilzo-inl.cD22-Nov-2023138.1 KiB4,5844,279

minilzo.hD22-Nov-20233.6 KiB11033

misc.cD22-Nov-20237.3 KiB271209

priv_d3basics.hD22-Nov-202321.1 KiB686508

priv_image.hD22-Nov-202312.4 KiB352178

priv_misc.hD22-Nov-20232.8 KiB7423

priv_readdwarf.hD22-Nov-20232.6 KiB7922

priv_readdwarf3.hD22-Nov-20232.3 KiB6015

priv_readelf.hD22-Nov-20232.2 KiB627

priv_readmacho.hD22-Nov-20232.1 KiB567

priv_readpdb.hD22-Nov-20232.4 KiB6717

priv_readstabs.hD22-Nov-20231.9 KiB569

priv_storage.hD22-Nov-202333.8 KiB965417

priv_tytypes.hD22-Nov-20237.9 KiB225129

readdwarf.cD22-Nov-2023147.6 KiB4,2672,931

readdwarf3.cD22-Nov-2023165.9 KiB4,4702,945

readelf.cD22-Nov-2023111.1 KiB2,8882,080

readmacho.cD22-Nov-202342.6 KiB1,174755

readpdb.cD22-Nov-202381.3 KiB2,5221,902

readstabs.cD22-Nov-202313.3 KiB395240

storage.cD22-Nov-202361.8 KiB1,9481,353

tytypes.cD22-Nov-202331.5 KiB934787

README.txt

1
2On 4 Apr 06, the debuginfo reader (m_debuginfo) was majorly cleaned up
3and restructured.  It has been a bit of a tangle for a while.  The new
4structure looks like this:
5
6                  debuginfo.c
7
8                   readelf.c
9
10        readdwarf.c        readstabs.c
11
12                   storage.c
13
14Each .c can only call those below it on the page.
15
16storage.c contains the SegInfo structure and stuff for
17maintaining/searching arrays of symbols, line-numbers, and Dwarf CF
18info records.
19
20readdwarf.c and readstabs.c parse the relevant kind of info and
21call storage.c to store the results.
22
23readelf.c reads ELF format, hands syms directly to storage.c,
24then delegates to readdwarf.c/readstabs.c for debug info.  All
25straightforward.
26
27debuginfo.c is the top-level file, and is quite small.
28
29There are 3 goals to this:
30
31(1) Generally tidy up something which needs tidying up
32
33(2) Introduce more modularity, so as to make it easier to add
34    readers for other formats, if needed
35
36(3) Simplify the stabs reader.
37
38Rationale for (1) and (2) are obvious.
39
40Re (3), the stabs reader has for a good year contained a sophisticated
41and impressive parser for stabs strings, with the aim of recording in
42detail the types of variables (I think) (Jeremy's work).  Unfortunately
43that has caused various segfaults reading stabs info in the past few months
44(#77869, #117936, #119914, #120345 and another to do with deeply nested
45template types).
46
47The worst thing is that it is the stabs type reader that is crashing,
48not the stabs line-number reader, but the type info is only used by
49Helgrind, which is looking pretty dead at the moment.  So I have lifed
50out the type-reader code and put it in UNUSED_STABS.txt for safe
51storage, just leaving the line-number reader in place.
52
53If Helgrind ever does come back to life we will need to reinstate the
54type storage/reader stuff but with DWARF as its primary target.
55Placing the existing stabs type-reader in hibernation improves
56stability whilst retaining the development effort/expertise that went
57into it for possible future reinstatement.
58