[lldb-dev] proposed change to remove conditional WCHAR support in libedit wrapper

2021-07-10 Thread Neal Sidhwaney via lldb-dev
Hello,

I was thinking of removing the conditional compilation to use libedit’s WCHAR 
support on non-Windows platforms.  The conditional preprocessor logic is 
definitely the correct way to support both wide & narrow character APIs, but 
editline has enabled the wide API’s by default for some time, and there might 
be an opportunity today to simplify it.  

I’m thinking that using the wide-character API and converting to 
narrow-character string whenever interacting with the rest of LLDB makes the 
most sense.  One hopefully small issue that the history filename is determined 
based on whether WCHAR is used or not.  So history might not work unless people 
rename their file after using a version with this change.  From what I could 
tell, the format of the file is actually the same whether you use history() or 
history_w(), so it doesn’t have to be converted from narrow chars to wide 
characters, although I only tested that on OS X.

There is a WIP of what this might look like here: 
https://github.com/llvm/llvm-project/compare/main...nealsid:lldb-editline-remove-wchar
 

 However, it uses the narrow character libedit API. But it gives an idea of 
what changes will be necessary.  

Anyone else think this could be useful? Or, conversely, does anyone see 
something that I missed that requires the conditional compilation to remain in? 
Since a broken shell would be bad for everyone, I am not sure what the best way 
is to verify who it might break, i.e. if people who use LLDB from head want to 
test it first, or other platforms to consider besides OS X/Linux/Windows.

Thanks,

Neal


___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 51046] New: Empty strings removed from target's argument list

2021-07-10 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=51046

Bug ID: 51046
   Summary: Empty strings removed from target's argument list
   Product: lldb
   Version: 10.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: tom.pou...@gmail.com
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

When I run :

./myprog "" 2 4 2 

from bash or zsh the empty string argument is included in the list of arguments
but when I use :

lldb -- ./myprog "" 2 4 2

the empty string is removed from the arguments. So I can't really debug passing 
empty strings to my program. Is is a technical constraint or a design choice or
a bug ?

Running clang version 10.0.0-4ubuntu1 Target : x86_64-pc-linux-gnu

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 51048] New: x86 build failed on lldb 11

2021-07-10 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=51048

Bug ID: 51048
   Summary: x86 build failed on lldb 11
   Product: lldb
   Version: 11.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: danglingpoin...@outlook.com
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

> [63/898] Building CXX object 
> source/Host/CMakeFiles/lldbHost.dir/posix/HostInfoPosix.cpp.o
> ninja: job failed: : && /usr/bin/clang++ -Os -fomit-frame-pointer -fPIC 
> -fvisibility-inlines-hidden -Werror=date-time 
> -Werror=unguarded-availability-new -w -fdiagnostics-color -ffunction-sections 
> -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas 
> -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -Os 
> -fomit-frame-pointer -Os -DNDEBUG -Wl,--as-needed,-O1,--sort-common 
> -Wl,--as-needed,-O1,--sort-common   
> -Wl,-rpath-link,/builds/kasperk81/aports/community/lldb/src/lldb-11.1.0.src/build/./lib
>   -Wl,-O3 -Wl,--gc-sections 
> utils/lit-cpuid/CMakeFiles/lit-cpuid.dir/lit-cpuid.cpp.o -o bin/lit-cpuid  
> -Wl,-rpath,"\$ORIGIN/../lib:/usr/lib/llvm11/lib"  
> /usr/lib/libclang-cpp.so.11.1  /usr/lib/llvm11/lib/libLLVMSupport.a  
> /usr/lib/llvm11/lib/libLLVM-11.so  -lz  -lrt  -ldl  -lm  
> /usr/lib/llvm11/lib/libLLVMDemangle.a && :
> /usr/bin/ld: /usr/lib/llvm11/lib/libLLVMSupport.a(raw_ostream.cpp.o): in 
> function `llvm::raw_fd_ostream::preferred_buffer_size() const':
> raw_ostream.cpp:(.text._ZNK4llvm14raw_fd_ostream21preferred_buffer_sizeEv+0xac):
>  undefined reference to `__stack_chk_fail_local'
> /usr/bin/ld: /usr/lib/llvm11/lib/libLLVMSupport.a(raw_ostream.cpp.o): in 
> function `llvm::raw_fd_ostream::~raw_fd_ostream()':
> raw_ostream.cpp:(.text._ZN4llvm14raw_fd_ostreamD2Ev+0xe1): undefined 
> reference to `__stack_chk_fail_local'
> /usr/bin/ld: /usr/lib/llvm11/lib/libLLVMSupport.a(raw_ostream.cpp.o): in 
> function `llvm::raw_ostream::operator<<(llvm::formatv_object_base const&)':
> raw_ostream.cpp:(.text._ZN4llvm11raw_ostreamlsERKNS_19formatv_object_baseE+0x50e):
>  undefined reference to `__stack_chk_fail_local'
> /usr/bin/ld: /usr/lib/llvm11/lib/libLLVMSupport.a(raw_ostream.cpp.o): in 
> function `llvm::raw_fd_ostream::raw_fd_ostream(llvm::StringRef, 
> std::error_code&, llvm::sys::fs::CreationDisposition, 
> llvm::sys::fs::FileAccess, llvm::sys::fs::OpenFlags)':
> raw_ostream.cpp:(.text._ZN4llvm14raw_fd_ostreamC2ENS_9StringRefERSt10error_codeNS_3sys2fs19CreationDispositionENS5_10FileAccessENS5_9OpenFlagsE+0x111):
>  undefined reference to `__stack_chk_fail_local'
> /usr/bin/ld: /usr/lib/llvm11/lib/libLLVMSupport.a(raw_ostream.cpp.o): in 
> function `llvm::outs()':
> raw_ostream.cpp:(.text._ZN4llvm4outsEv+0xb5): undefined reference to 
> `__stack_chk_fail_local'
> /usr/bin/ld: 
> /usr/lib/llvm11/lib/libLLVMSupport.a(Host.cpp.o):Host.cpp:(.text._ZL21updateTripleOSVersionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x825):
>  more undefined references to `__stack_chk_fail_local' follow

Full logs are available at:
https://gitlab.alpinelinux.org/kasperk81/aports/-/jobs/433659

-- 
You are receiving this mail because:
You are the assignee for the bug.___
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev