Prevent PLT (procedure linkage table) breakpoints in GDB

后端 未结 4 1165
悲哀的现实
悲哀的现实 2021-02-04 06:00

In recent versions of GDB, setting a breakpoint on a library function call results in multiple actual breakpoints:

  1. Call into the procedure linkage table (PLT)
4条回答
  •  误落风尘
    2021-02-04 06:27

    I think I found a solution for this problem. You can use the

    break *address
    

    syntax of break, but instead of specifying a hex address, you give the name of the function (which evaluates to the function's address). Something like

    break *myfunction
    

    That sets a breakpoint only on the main function, and not any of the PLT versions.

提交回复
热议问题