Closed Marc-Aldorasi-Imprivata closed 2 years ago
Sounds reasonable, but I probably won't address this in the near future. A pull request is very welcome, thoguh ;-) Do you also have an example where respective DWARF info is emitted?
void foo();
void bar() {
try {
foo();
} catch (...) {
foo();
}
}
If you compile this with GCC 8.2.1 with the options -O3
and -ggdb3
, it will place the contents of the catch block outside the main body of bar and so the DWARF for bar will have 2 address ranges.
Implemented with pull request #71
We only add
S_GPROC
entries if the dwarf entry for a function contains both pchi and pclo entries. If the function has multiple code ranges, we can emit the first range as we do now and emit the additional ranges asS_SEPCODE
entries (see https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/include/cvinfo.h#L4148 for the structure layout, and https://msdl.microsoft.com/download/symbols/iphlpapi.pdb/73C3E5A77A9CF1A38763A6DC6E671DC31/iphlpapi.pdb for a pdb with such entries).