<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi All,<br>
<br>
I want to change debug information of an llvm instruction so that
the modified debug info is subsequently passed to executable binary.
So if I use "addr2line" utility on the binary, it will return my
modified debug information. <br>
<br>
I've tried to change by using the following code snippet:<br>
<br>
<blockquote>MDNode *N = Inst->getMetadata("dbg");<br>
DebugLoc Loc = DebugLoc::get(newLine, newCol, N);<br>
Inst->setDebugLoc(Loc);<br>
</blockquote>
I read the DebugLoc back by using<br>
<blockquote>const DebugLoc D = Inst->getDebugLoc();<br>
unsigned Line = D.getLine(); <br>
outs() << Line <<"\n"; <br>
</blockquote>
But I can't set the debug info correctly. How can I change the debug
info correctly through llvm pass?<br>
<br>
Thanks<br>
Riyad<br>
</body>
</html>