[Lldb-commits] [PATCH] D14689: Embed libpanel(3) for NetBSD-7.0

Kamil Rytarowski via lldb-commits lldb-commits at lists.llvm.org
Sun Nov 15 16:51:43 PST 2015


krytarowski created this revision.
krytarowski added reviewers: clayborg, emaste.
krytarowski added subscribers: lldb-commits, brucem.
krytarowski set the repository for this revision to rL LLVM.

The libpanel(3) library was developed after the NetBSD-7.0 release.
This curses' extension lib is used within lldb.
    
There were few ways to address this lack of functionality in the base:
 a. require ncurses in 7.0 (ncurses it's not a part of base in NetBSD)
 b. provide external package library with libpanel in pkgsrc
 c. mix native curses with ncurses' panel
 d. embed libpanel in lldb
    
I was trying to go for a) and b), but it was trouble some increasing
complexity of Makefiles and sources and it required additional paths from
command line, as pkgsrc with ncurses may be installed in freely given prefix.
b) and c) resulted in conflicts.
    
Go for d) as it's the simplest solution:
 - it doesn't require pkgsrc neither any externally specified libpanel,
 - this approach is already in use for getopt_long_only(3),
 - no need to ifdefing paths for libraries and headers of curses(3),
   ncurses headers are prefixed with a directory 'ncurses/' and source code
   will need to be fixed for it,
 - paradoxically it doesn't require changes in the common code like the other
   solutions,
 - it doesn't need manually specified paths from command line,
 - it's self-containing.
    
The libpanel library is relatively tiny and built only for the NetBSD target.

With this diff I can built LLDB on NetBSD using CMake.

Repository:
  rL LLVM

http://reviews.llvm.org/D14689

Files:
  cmake/modules/LLDBConfig.cmake
  include/lldb/Host/HostLibPanel.h
  include/lldb/Host/netbsd/libpanel/panel.h
  source/Core/IOHandler.cpp
  source/Host/CMakeLists.txt
  source/Host/netbsd/libpanel/_deck.cpp
  source/Host/netbsd/libpanel/above.cpp
  source/Host/netbsd/libpanel/below.cpp
  source/Host/netbsd/libpanel/bottom.cpp
  source/Host/netbsd/libpanel/del.cpp
  source/Host/netbsd/libpanel/getuser.cpp
  source/Host/netbsd/libpanel/hidden.cpp
  source/Host/netbsd/libpanel/hide.cpp
  source/Host/netbsd/libpanel/move.cpp
  source/Host/netbsd/libpanel/new.cpp
  source/Host/netbsd/libpanel/panel_impl.h
  source/Host/netbsd/libpanel/replace.cpp
  source/Host/netbsd/libpanel/setuser.cpp
  source/Host/netbsd/libpanel/show.cpp
  source/Host/netbsd/libpanel/top.cpp
  source/Host/netbsd/libpanel/update.cpp
  source/Host/netbsd/libpanel/window.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14689.40240.patch
Type: text/x-patch
Size: 41431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151116/abb2401a/attachment-0001.bin>


More information about the lldb-commits mailing list