[Lldb-commits] [PATCH] D62021: Fix LLDB warnings when compiling with Clang 8.0

2019-05-21 Thread Alexandre Ganea via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
aganea marked an inline comment as done.
Closed by commit rL361295: Fix LLDB warnings when compiling with Clang 8.0 
(authored by aganea, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D62021?vs=199867&id=200569#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D62021

Files:
  lldb/trunk/source/Host/common/GetOptInc.cpp
  lldb/trunk/source/Host/common/MainLoop.cpp
  lldb/trunk/source/Host/common/Socket.cpp
  lldb/trunk/source/Host/windows/ProcessLauncherWindows.cpp
  lldb/trunk/source/Host/windows/Windows.cpp
  lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
  lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
  
lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp

Index: lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
===
--- lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
+++ lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
@@ -66,92 +66,128 @@
  {dwarf_rax_x86_64, dwarf_rax_x86_64, LLDB_INVALID_REGNUM,
   LLDB_INVALID_REGNUM, lldb_rax_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(rbx, nullptr),
  {dwarf_rbx_x86_64, dwarf_rbx_x86_64, LLDB_INVALID_REGNUM,
   LLDB_INVALID_REGNUM, lldb_rbx_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(rcx, nullptr),
  {dwarf_rcx_x86_64, dwarf_rcx_x86_64, LLDB_REGNUM_GENERIC_ARG1,
   LLDB_INVALID_REGNUM, lldb_rcx_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(rdx, nullptr),
  {dwarf_rdx_x86_64, dwarf_rdx_x86_64, LLDB_REGNUM_GENERIC_ARG2,
   LLDB_INVALID_REGNUM, lldb_rdx_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(rdi, nullptr),
  {dwarf_rdi_x86_64, dwarf_rdi_x86_64, LLDB_INVALID_REGNUM,
   LLDB_INVALID_REGNUM, lldb_rdi_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(rsi, nullptr),
  {dwarf_rsi_x86_64, dwarf_rsi_x86_64, LLDB_INVALID_REGNUM,
   LLDB_INVALID_REGNUM, lldb_rsi_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(rbp, "fp"),
  {dwarf_rbp_x86_64, dwarf_rbp_x86_64, LLDB_REGNUM_GENERIC_FP,
   LLDB_INVALID_REGNUM, lldb_rbp_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(rsp, "sp"),
  {dwarf_rsp_x86_64, dwarf_rsp_x86_64, LLDB_REGNUM_GENERIC_SP,
   LLDB_INVALID_REGNUM, lldb_rsp_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(r8, nullptr),
  {dwarf_r8_x86_64, dwarf_r8_x86_64, LLDB_REGNUM_GENERIC_ARG3,
   LLDB_INVALID_REGNUM, lldb_r8_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(r9, nullptr),
  {dwarf_r9_x86_64, dwarf_r9_x86_64, LLDB_REGNUM_GENERIC_ARG4,
   LLDB_INVALID_REGNUM, lldb_r9_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(r10, nullptr),
  {dwarf_r10_x86_64, dwarf_r10_x86_64, LLDB_REGNUM_GENERIC_ARG5,
   LLDB_INVALID_REGNUM, lldb_r10_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(r11, nullptr),
  {dwarf_r11_x86_64, dwarf_r11_x86_64, LLDB_REGNUM_GENERIC_ARG6,
   LLDB_INVALID_REGNUM, lldb_r11_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(r12, nullptr),
  {dwarf_r12_x86_64, dwarf_r12_x86_64, LLDB_INVALID_REGNUM,
   LLDB_INVALID_REGNUM, lldb_r12_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(r13, nullptr),
  {dwarf_r13_x86_64, dwarf_r13_x86_64, LLDB_INVALID_REGNUM,
   LLDB_INVALID_REGNUM, lldb_r13_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(r14, nullptr),
  {dwarf_r14_x86_64, dwarf_r14_x86_64, LLDB_INVALID_REGNUM,
   LLDB_INVALID_REGNUM, lldb_r14_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(r15, nullptr),
  {dwarf_r15_x86_64, dwarf_r15_x86_64, LLDB_INVALID_REGNUM,
   LLDB_INVALID_REGNUM, lldb_r15_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR(rip, "pc"),
  {dwarf_rip_x86_64, dwarf_rip_x86_64, LLDB_REGNUM_GENERIC_PC,
   LLDB_INVALID_REGNUM, lldb_rip_x86_64},
  nullptr,
- nullptr},
+ nullptr,
+ nullptr,
+ 0},
 {DEFINE_GPR_BIN(eflags, "flags"),
  {L

[Lldb-commits] [PATCH] D62021: Fix LLDB warnings when compiling with Clang 8.0

2019-05-17 Thread Alexandre Ganea via Phabricator via lldb-commits
aganea marked 2 inline comments as done.
aganea added inline comments.



Comment at: source/Host/windows/ProcessLauncherWindows.cpp:35-37
+  reinterpret_cast(const_cast(warg.c_str())),
+  reinterpret_cast(
+  const_cast(warg.c_str() + warg.size() + 1)));

labath wrote:
> I don't believe the const_cast here is needed. You should be able to just 
> reinterpret_cast to `const char *`..
You're right - fixed.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D62021



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


[Lldb-commits] [PATCH] D62021: Fix LLDB warnings when compiling with Clang 8.0

2019-05-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments.



Comment at: source/Host/windows/ProcessLauncherWindows.cpp:35-37
+  reinterpret_cast(const_cast(warg.c_str())),
+  reinterpret_cast(
+  const_cast(warg.c_str() + warg.size() + 1)));

I don't believe the const_cast here is needed. You should be able to just 
reinterpret_cast to `const char *`..


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D62021



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


[Lldb-commits] [PATCH] D62021: Fix LLDB warnings when compiling with Clang 8.0

2019-05-16 Thread Aleksandr Urakov via Phabricator via lldb-commits
aleksandr.urakov accepted this revision.
aleksandr.urakov added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D62021



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


[Lldb-commits] [PATCH] D62021: Fix LLDB warnings when compiling with Clang 8.0

2019-05-16 Thread Alexandre Ganea via Phabricator via lldb-commits
aganea created this revision.
aganea added reviewers: JDevlieghere, aleksandr.urakov, asmith, mgorny.
aganea added a project: LLDB.
Herald added subscribers: lldb-commits, abidh, aprantl.

Ditto. Please see warnings list:

  [2660/3259] Building CXX object 
tools\lldb\source\Host\CMakeFiles\lldbHost.dir\common\GetOptInc.cpp.obj
  F:\svn\lldb\source\Host\common\GetOptInc.cpp(100,17): warning: cast from 
'char *const *' to 'char **' drops const qualifier [-Wcast-qual]
((char **)nargv)[pos] = nargv[cstart];
  ^
  F:\svn\lldb\source\Host\common\GetOptInc.cpp(102,17): warning: cast from 
'char *const *' to 'char **' drops const qualifier [-Wcast-qual]
((char **)nargv)[cstart] = swap;
  ^
  2 warnings generated.
  [2677/3259] Building CXX object 
tools\lldb\source\Host\CMakeFiles\lldbHost.dir\common\MainLoop.cpp.obj
  F:\svn\lldb\source\Host\common\MainLoop.cpp(64,13): warning: unused function 
'SignalHandler' [-Wunused-function]
  static void SignalHandler(int signo, siginfo_t *info, void *) {
  ^
  1 warning generated.
  [2694/3259] Building CXX object 
tools\lldb\source\Host\CMakeFiles\lldbHost.dir\common\Socket.cpp.obj
  F:\svn\lldb\source\Host\common\Socket.cpp(398,17): warning: format specifies 
type 'int' but the argument has type 'lldb_private::NativeSocket' (aka 
'unsigned long long') [-Wformat]
  m_socket);
  ^~~~
  1 warning generated.
  [2704/3259] Building CXX object 
tools\lldb\source\Host\CMakeFiles\lldbHost.dir\windows\Windows.cpp.obj
  F:\svn\lldb\source\Host\windows\Windows.cpp(87,19): warning: cast from 'const 
char *' to 'char *' drops const qualifier [-Wcast-qual]
return ((char *)s);
^
  1 warning generated.
  [2706/3259] Building CXX object 
tools\lldb\source\Host\CMakeFiles\lldbHost.dir\windows\ProcessLauncherWindows.cpp.obj
  F:\svn\lldb\source\Host\windows\ProcessLauncherWindows.cpp(33,43): warning: 
cast from 'const wchar_t *' to 'char *' drops const qualifier [-Wcast-qual]
buffer.insert(buffer.end(), (char *)warg.c_str(),
^
  F:\svn\lldb\source\Host\windows\ProcessLauncherWindows.cpp(34,29): warning: 
cast from 'const wchar_t *' to 'char *' drops const qualifier [-Wcast-qual]
  (char *)(warg.c_str() + warg.size() + 1));
  ^
  2 warnings generated.
  [2944/3259] Building CXX object 
tools\lldb\source\Plugins\Process\Windows\Common...eFiles\lldbPluginProcessWindowsCommon.dir\x64\RegisterContextWindows_x64.cpp.obj
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(69,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(74,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(79,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(84,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(89,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(94,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(99,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(104,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(109,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(114,13):
 warning: missing field 'dynamic_size_dwarf_expr_bytes' initializer 
[-Wmissing-field-initializers]
   nullptr},
  ^
  
F:\svn\lldb\source\Plugins\Process\Windows\Common\x64\RegisterContextWindows_x64.cpp(119,13):
 warning: missi