<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I may be missing your point here, but I guess the easiest way would be for you to create an LLDB SBDebugger instance, and use its SBCommandInterpreter to send commands and read replies. Then, you can parse the command output for each thing you send, and use the parsed information to generate your visuals.</div><div><br></div><div>If you are particularly adventurous you could even create a Python class with method calls like SetBreakpoint, Step, ... and have these methods send the right commands and return you correctly parsed output.</div><div><br></div><div>Of course, if anything in the way LLDB displays data changes, your parser would have to change along with it. But, for a cheap way out, this one seems pretty reasonable.</div><div><br></div><div>Sincerely,<br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="font-family: Helvetica; font-size: medium; "><i>Enrico Granata</i></div></div></span></div></span><span class="Apple-style-span" style="font-style: normal; color: rgb(92, 92, 92); font-family: 'Myriad Set'; font-size: 13px; ">✆ </span><span class="Apple-style-span" style="font-style: normal; font-family: 'Lucida Grande'; font-size: 11px; ">408.974.5572</span><span class="Apple-style-span" style="font-style: normal; font-size: 12px; color: rgb(92, 92, 92); font-family: 'Myriad Set'; "><span class="Apple-style-span" style="font-size: 13px; "><font class="Apple-style-span" size="3" style="font-size: 11px; "><span class="Apple-style-span" style="font-size: 12px; "> | <span class="Apple-style-span" style="font-family: Helvetica; font-size: 11px; "><font class="Apple-style-span" size="4" style="font-size: 13px; "><font class="Apple-style-span" color="#5C5C5C"><font class="Apple-style-span" face="'Myriad Set'">✉ </font></font></font></span></span></font></span></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">egranata@<font class="Apple-style-span" color="#F80A17"></font>.com</span></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br></span></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Aug 31, 2011, at 9:13 PM, <a href="mailto:egon@ragequ.it">egon@ragequ.it</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I didn't really explain that particularly well - I figured I would have external python scripts that draw the UI for other windows using ncurses and connect to some comms channel opened by whatever is running within LLDB's python interpreter. These external scripts would be consumers of data pushed out by that internal script and render that data (disassembly around current EIP/RIP, stack data, etc). Really I should just implement a full new front end but I will never get around to it and just want a cheap way out.<br><br>Egon<br><br>On 01/09/2011, at 2:04 PM, <a href="mailto:egon@ragequ.it">egon@ragequ.it</a> wrote:<br><br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I want to implement some additional interfaces on top of LLDB using python and I was hoping someone might be able to tell me how feasible it would be to do just using LLDB's embedded python interpreter.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I would like to run a regular LLDB session in one terminal and display register contents, disassembly and stack contents in other windows to somewhat mimic the displays of debuggers like Immunity or OllyDbg on Windows. I'd prefer to not have to implement a full new front end for LLDB as this is just intended to be complementary to the standard console interface to LLDB. I think I would need to be able to register handlers to be called on breakpoints (this looks quite easy from the documentation), but also handlers to be called after stepping over an instruction (to update the selected line in the disassembly, update register contents display, etc).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Does this sound like something that could be easily implemented using the embedded python scripting? I have had a look at the documentation but I can't see anything that help with this. I'm open to other suggestions :)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">lldb-dev mailing list<br></blockquote><blockquote type="cite"><a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br></blockquote><blockquote type="cite"><a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br></blockquote><br><br>_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev<br></div></blockquote></div><br></div></body></html>