3 ms·
There's no need for JIT to obtain this information - and JIT compilers usually don't compile from source code, but from either an intermediate representation su
by johndoe0815 4y ago
There's no need for JIT to obtain this information - and JIT compilers usually don't compile from source code, but from either an intermediate representation such as Java byte codes or a different ISA.
The file name and line number corresponding to a program counter value is included in the debug info (e.g. when compiling C code with gcc's -g option), an exception handler can easily look up this information. However, it is not very common to ship binaries with included debug symbols, since this makes reverse engineering a bit easier.