<div dir="ltr">Thanks, David for the quick response. It definitely has solved the problem. <div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Sangeeta</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 15, 2020 at 7:43 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Check the DISubprogram associated with the cloned function (in the<br>
LLVM IR the Function definition would have an "!dbg !47" at the end,<br>
and that !47 would refer to a !DISubprogram that describes th<br>
efunction) - you'd probably need to create a new DISubprogram and set<br>
that as the subprogram for the new llvm::Function so it doesn't share<br>
the same description/name/etc as the original.<br>
<br>
On Mon, Jun 15, 2020 at 4:37 PM SANGEETA CHOWDHARY via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> 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.<br>
> Can someone please help me with this?<br>
><br>
> Regards,<br>
> Sangeeta<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>