I am working on creating a llvm pass which clones a certain function with a different name using CloneFunctionInto. I create a call instruction to call a new cloned function from the old function. In llvm IR and in .s file everything looks as expected, but when I call this program with gdb and set a breakpoint on this new function, gdb shows the name of the original function. I know it has to do something with debug options but I am not sure how should I set the debug options of this new function so that I can see it in gdb.
Can someone please help me with this?