[Lldb-commits] [PATCH] D119186: [lldb][gdb-remote] Fix linking of gdb-remote when LLVM_ENABLE_ZLIB is ON

2022-02-07 Thread Khem Raj via Phabricator via lldb-commits
raj.khem added a comment.

I tested this patch and it fixes lldb build. Thanks for taking care of this,.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119186/new/

https://reviews.llvm.org/D119186

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


[Lldb-commits] [PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-04 Thread Khem Raj via Phabricator via lldb-commits
raj.khem added a comment.

http://sprunge.us/FJzZXL is a file from harfbuzz and it warns

  a.cc:28670:32: error: variable 'supp_size' set but not used 
[-Werror,-Wunused-but-set-variable]
  unsigned int size0, size1, supp_size = 0;

I do not have -Werror enabled but it still is reported as error. There is no 
way to disable this warning ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581

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


[Lldb-commits] [PATCH] D102872: Fix lldb-server build failure on mips

2021-05-20 Thread Khem Raj via Phabricator via lldb-commits
raj.khem created this revision.
raj.khem added a project: LLDB.
Herald added subscribers: JDevlieghere, atanasyan, arichardson, sdardis.
raj.khem requested review of this revision.
Herald added a subscriber: lldb-commits.

This helps fixing lldb-server build regression

> /mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux-musl/clang/13.0.0-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux-musl/mips-yoe-linux-musl-ld:
>  lib/liblldbPluginProcessLinux.a(NativeThreadLinux.cpp.o): in function 
> `lldb_private::process_linux::NativeThreadLinux::NativeThreadLinux(lldb_private::process_linux::NativeProcessLinux&,
>  unsigned long long)':
> NativeThreadLinux.cpp:(.text._ZN12lldb_private13process_linux17NativeThreadLinuxC2ERNS0_18NativeProcessLinuxEy+0x74):
>  undefined reference to 
> `lldb_private::process_linux::NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(lldb_private::ArchSpec
>  const&, lldb_private::process_linux::NativeThreadLinux&)'
> /mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux-musl/clang/13.0.0-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux-musl/mips-yoe-linux-musl-ld:
>  
> NativeThreadLinux.cpp:(.text._ZN12lldb_private13process_linux17NativeThreadLinuxC2ERNS0_18NativeProcessLinuxEy+0x7c):
>  undefined reference to 
> `lldb_private::process_linux::NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(lldb_private::ArchSpec
>  const&, lldb_private::process_linux::NativeThreadLinux&)'
> clang-13: error: linker command failed with exit code 1 (use -v to see 
> invocation)




Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102872

Files:
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h


Index: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
===
--- lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
+++ lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
@@ -26,7 +26,8 @@
   // variant should be compiled into the final executable.
   static std::unique_ptr
   CreateHostNativeRegisterContextLinux(const ArchSpec &target_arch,
-   NativeThreadLinux &native_thread);
+   NativeThreadLinux &native_thread)
+  { return 0; }
 
   // Invalidates cached values in register context data structures
   virtual void InvalidateAllRegisters(){}


Index: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
===
--- lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
+++ lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
@@ -26,7 +26,8 @@
   // variant should be compiled into the final executable.
   static std::unique_ptr
   CreateHostNativeRegisterContextLinux(const ArchSpec &target_arch,
-   NativeThreadLinux &native_thread);
+   NativeThreadLinux &native_thread)
+	   { return 0; }
 
   // Invalidates cached values in register context data structures
   virtual void InvalidateAllRegisters(){}
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D102872: Fix lldb-server build failure on mips

2021-05-20 Thread Khem Raj via Phabricator via lldb-commits
raj.khem updated this revision to Diff 346855.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102872/new/

https://reviews.llvm.org/D102872

Files:
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp


Index: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
===
--- lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
+++ lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
@@ -23,6 +23,13 @@
   return m_thread.GetProcess().GetByteOrder();
 }
 
+std::unique_ptr
+NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
+  const ArchSpec &target_arch,
+   NativeThreadLinux &native_thread) {
+   return 0;
+}
+
 Status NativeRegisterContextLinux::ReadRegisterRaw(uint32_t reg_index,
RegisterValue ®_value) {
   const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(reg_index);


Index: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
===
--- lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
+++ lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
@@ -23,6 +23,13 @@
   return m_thread.GetProcess().GetByteOrder();
 }
 
+std::unique_ptr
+NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
+	   const ArchSpec &target_arch,
+   NativeThreadLinux &native_thread) {
+	return 0;
+}
+
 Status NativeRegisterContextLinux::ReadRegisterRaw(uint32_t reg_index,
RegisterValue ®_value) {
   const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(reg_index);
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D102872: Fix lldb-server build failure on mips

2021-05-21 Thread Khem Raj via Phabricator via lldb-commits
raj.khem added a comment.

In D102872#2773106 , @DavidSpickett 
wrote:

> I assume this is caused by the removal of the specific 
> `NativeRegisterContextLinux_mips` and you are building lldb on MIPS but 
> you're going to connect to another debug server (gdb, custom stub etc.).
>
> The problem with doing it this way is then if you build on a supported 
> platform e.g. AArch64 `NativeRegisterContextLinux_arm64` we then have two 
> copies of CreateHostNativeRegisterContextLinux. Somehow this isn't an error 
> on my system, and it picks up the one you've added. Meaning that you can't 
> debug a simple hello world.
>
> See the comment in 
> `lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h`. (though 
> again I'd have expect a hard linker error but anyway) Also the reason CI 
> didn't fail is that lldb is disabled for both of the builds.
>
> I can see the utility in allowing people to build at least lldb (client) on 
> any platform. Perhaps we surround this in the `#ifdef` that the old mips 
> register context used? Or modify our cmake to allow lldb-server to be 
> disabled. (easier said than done)

yes that will be ok. Although, I think for kind of devices mips is used in, 
lldb-server is more useful even if it will not support all features.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102872/new/

https://reviews.llvm.org/D102872

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


[Lldb-commits] [PATCH] D70764: build: reduce CMake handling for zlib

2020-01-06 Thread Khem Raj via Phabricator via lldb-commits
raj.khem added a comment.

this is now in master, and I am seeing build failures in cross-building clang, 
e.g. when building clang for arm on a x86_64 host. its resorting to finding, 
libz from buildhost instead of target sysroot ( using --sysroot) and failing in 
link step. e.g.

FAILED: bin/llvm-config
...
 -o bin/llvm-config  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMSupport.a  
/usr/lib/libz.so  -lrt  -ldl  -ltinfo  -lm  lib/libLLVMDemangle.a
...

aarch64-yoe-linux-musl/aarch64-yoe-linux-musl-ld: /usr/lib/libz.so: error 
adding symbols: file in wrong format
clang-10: error: linker command failed with exit code 1 (use -v to see 
invocation)

you can see that its adding /usr/lib/libz.so to linker cmdline while cross 
linking.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70764/new/

https://reviews.llvm.org/D70764



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


[Lldb-commits] [PATCH] D70764: build: reduce CMake handling for zlib

2020-01-07 Thread Khem Raj via Phabricator via lldb-commits
raj.khem added a comment.

In D70764#1807405 , @smeenai wrote:

> In D70764#1803559 , @raj.khem wrote:
>
> > this is now in master, and I am seeing build failures in cross-building 
> > clang, e.g. when building clang for arm on a x86_64 host. its resorting to 
> > finding, libz from buildhost instead of target sysroot ( using --sysroot) 
> > and failing in link step. e.g.
> >
> > FAILED: bin/llvm-config
> >  ...
> >   -o bin/llvm-config  -Wl,-rpath,"\$ORIGIN/../lib"  
> > lib/libLLVMSupport.a  /usr/lib/libz.so  -lrt  -ldl  -ltinfo  -lm  
> > lib/libLLVMDemangle.a
> >  ...
> >
> > aarch64-yoe-linux-musl/aarch64-yoe-linux-musl-ld: /usr/lib/libz.so: error 
> > adding symbols: file in wrong format
> >  clang-10: error: linker command failed with exit code 1 (use -v to see 
> > invocation)
> >
> > you can see that its adding /usr/lib/libz.so to linker cmdline while cross 
> > linking.
>
>
> Have you set `CMAKE_SYSROOT` appropriately?


That is not the problem. Since in cases of target its finding is properly.
there are multiple pieces where some are being built for native( build host) 
some for target so it thinks its building for
buildhost (native) llvm-config e.g. is one such case. Replacing it with -lz 
fixes it becasue compile environment is providing
right --sysroot for native or cross cases and it always links with correct libs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70764/new/

https://reviews.llvm.org/D70764



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