[lldb-dev] Everyone: please download, build and test the new iohandler branch
gclayton at apple.com
Fri Jan 3 14:52:20 PST 2014
On Jan 3, 2014, at 2:36 PM, Ed Maste <emaste at freebsd.org> wrote:
> On 2 January 2014 17:56, Greg Clayton <gclayton at apple.com> wrote:
>> svn co https://$USER@llvm.org/svn/llvm-project/lldb/branches/iohandler
>> The first step is to get it building for your platform as I am sure the Makefiles are out of date.
> Here's my report for FreeBSD. I haven't looked into any of the issues
> in detail yet.
> I always use cmake to build LLDB. For this branch I needed the
> following changes:
> - SBInputReader.cpp
> + CommandObjectGUI.cpp
> - InputReader.cpp
> - InputReaderEZ.cpp
> - InputReaderStack.cpp
> + IOHandler.cpp
> + Editline.cpp
> - IOChannel.cpp
> (I can commit these changes to the iohandler branch if you like.)
Yes, please do!
> In addition ::getcurx() and such resulted in a compilation failure --
> on FreeBSD ncurses.h provides macro implementations of these. The man
> page has this note:
> All of these interfaces are provided as macros and functions. The
> macros are suppressed (and only the functions provided) when
> NCURSES_OPAQUE is defined.
Sounds good, please remove the "::" so things compile.
>> - autocomplete now working in the embedded python interpreter
> When trying to run the interpreter to test out this I got:
> (lldb) script
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "/tank/emaste/src/llvm/build-nodebug/lib/python2.7/site-packages/lldb/embedded_interpreter.py",
> line 58
> def one_line (self, input):
> IndentationError: unexpected indent
% svn commit
Transmitting file data .
Committed revision 198452.
>> - curses is now supported with the new IOHandler infrastructure. To try this out, run and hit a breakpoint, and type "gui" on the command line to drop into the curses GUI mode! Lots of stuff isn't hooked up yet, but I am sure the open source community can help fill in some new views and improve existing ones.
> Nifty - I can start the curses UI, but it seems none of the F-keys work.
This is something you will want to figure out on your system to see if you can get the function keys working. There is a work around for Apple builds where we look for \033OP for F1, so if you search for "\033OP" in the sources you can see the work around that we used to map non-standard function keys to the correct key definition.
If you type "infocmp" at your unix command line you should get a dump of the current key mappings and you should see what your function keys are mapped to. On my system I see:
If you place a breakpoint on the following line (IOHandler.cpp:1686):
HandleCharResult key_result = m_window_sp->HandleChar(ch);
then press F1 on your keyboard and see what characters come through, you can see what your function key is coming through as. It is probably an escape character followed by a few keys. Then you can either figure out how to enable function keys on your version of curses, or handle the keys like I did for Mac in the #if defined (__APPLE__) code that intercepts and remaps keys.
As a work around, you can use the right and left arrow keys to bring up the menus so you can select LLDB->Exit.
Most menus don't work at the moment except for "LLDB->Exit", but I will be hooking them up soon.
A few things to try in "gui" mode:
Press TAB to change the active window. The active window has the solid white border around it. Each window can handle keys differently.
when the source view is selected press the following keys:
s - step in
n - step over
o - step out
k - kill
d - detach
b - set breakpoint on selected line
UP/DOWN - move line selection around so you can set breakpoints and run to that line
SPACE - set one shot breakpoint on selected line and and run to that line
, = page up
. = page down
When the "variables" view is selected:
UP/DOWN - use the arrow keys to change the selection around
RIGHT - expand current item
LEFT - unexpand if the item is expandable, else select the parent if not expandable
x - format value as hex
u = format value as unsigned
o = format value as octal
, = page up
. = page down
> I also have 19 failing tests when I run the test suite on this branch.
Yep, I have about the same thing and we will need to work these things out and fix them.
More information about the lldb-dev