How does gdb set software breakpoints in shared library functions?
问题 I know that software breakpoints in an executable file can work through replacing some assembler instruction at the desired place with another one, which cause interrupt. So debugger can stop execution exactly at this place and replace this instruction with original one and ask user about what to do the next or call some commands and etc. But code of such executable file is not used by another programs and has only one copy in memory. How can software breakpoints work with a shared libraries?