<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 6, 2017, at 9:50 AM, Ana Julia Pereira Caetano via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="" class="">Hi,<br class=""><br class="">I was taking a look at the disassembler on PowerPC64.</span><span lang="EN-US" style="" class=""><br class=""><br class="">Usually, when we have a branch instruction, it shows the address of the target.<span class="Apple-converted-space"> </span><br class="">For example (function “ret1” in X86_64):<br class=""><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">GDB: 0x000000000040051d <+45>: callq 0x4004e0 <ret1> </span><br class=""><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">LLDB: 0x40051d <+45>: callq 0x4004e0 ; ret1 </span><br class=""><br class="">However, LLDB doesn’t do that in PPC64:<br class=""><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">GDB: 0x0000000010000658 <+72>: bl 0x10000670 <ret1> </span><br class=""><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">LLDB: 0x10000658 <+72>: bl .+67108760 </span><br class=""><br class=""><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;" class="">(Note that the comment "; ret1" is missing).<br class=""><br class=""></span>I noticed that LLDB on PPC64 is the only one that prints “.+” and the offset (which is unsigned in this case, that’s why it shows that strange number).<span class="Apple-converted-space"> </span><br class="">Why is it like this? Is there any special reason?<span class="Apple-converted-space"> </span><br class="">I was thinking about changing it and make it look more like the other ones, but first I want to know if that’s ok or if it should stay the way it is for some reason.<br class=""></span></div></div></div></blockquote><div><br class=""></div>This would be a question for the LLVM folks since we get the disassemblers from LLVM and just use them in LLDB. LLDB uses the LLVM disassembler and it will ask us to identify addresses during disassembly via a callback. So it seems you will need to change the LLVM disassembler to do something similar to the x86_64 callq instruction. Not exactly sure how it is done, but probably should't be too hard.</div><div><br class=""></div><div>Greg</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="" class="">Thank you,<br class="">Ana Julia<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div></div><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">lldb-dev mailing list</span><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:lldb-dev@lists.llvm.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">lldb-dev@lists.llvm.org</a><br style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a></div></blockquote></div><br class=""></body></html>