Although the base pointer register is not used when -fomit-frame-pointer
is used, looking at the assembly shows that the address at which we're
done pushing things on the stack does correspond to the line record
following the declaration's line record, so the heuristic indeed works
properly in that case as well. (I previously thought the right spot
should be the same as the entrypc, but hadn't looked closely enough at
the assembly).
// outputs one). If there is no explicit marker (e.g. GCC does not), we
// accept a bigger or equal lineno as a prologue end (this catches GCC's
// 0-line advances).
- // Note that this heuristic does not work properly if the program was
- // compiled with -fomit-stack-pointer (it skips the first line record,
- // which really is where the function begins).
// We may have to skip a few because some old compilers plop
// in dummy line records for longer prologues. If we go too