I understand that .class files contain line numbers associated to the byte code in order to facilitate the job of debuggers as described here.
I also understand that each thread has its own pc Register which points at the next instruction, as described here. By using these registers, debuggers are able to, for instance, stop at specific lines, by associating the instruction to the line number.
I also understand that Java threads are bound to OS threads, which are executed as native code.
However, the description of pc Registers says that
If the method currently being executed by the thread is native, the value of the Java Virtual Machine's pc register is undefined.
The question then is: if debuggers use line numbers associated with byte code instructions, and pc registers inform the next instruction, how is it possible (in case it actually is) to debug thread code if it is executed as native code and because of that pc registers values are undefined?
What am I getting wrong?