[lldb-dev] [Bug 46716] New: Fix ODR violations in LLDB

2020-07-14 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=46716

Bug ID: 46716
   Summary: Fix ODR violations in LLDB
   Product: lldb
   Version: unspecified
  Hardware: PC
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: teempe...@gmail.com
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

LLDB fails to compile with latest GCC:

llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp:124: warning: type
‘struct DataDescriptor_32’ violates the C++ One Definition Rule [-Wodr]
  124 |   struct DataDescriptor_32 {
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:281: note: a
different type is defined in another translation unit
  281 |   struct DataDescriptor_32 {
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp:125: note: the first
difference of corresponding definitions is field ‘_used’
  125 | uint32_t _used;
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:282: note: a
field of same name but different type is defined in another translation unit
  282 | uint32_t _used : 26;
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp:131: warning: type
‘struct DataDescriptor_64’ violates the C++ One Definition Rule [-Wodr]
  131 |   struct DataDescriptor_64 {
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:289: note: a
different type is defined in another translation unit
  289 |   struct DataDescriptor_64 {
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp:132: note: the first
difference of corresponding definitions is field ‘_used’
  132 | uint64_t _used;
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:290: note: a
field of same name but different type is defined in another translation unit
  290 | uint64_t _used : 58;
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:314: warning:
type ‘struct DataDescriptor_32’ violates the C++ One Definition Rule [-Wodr]
  314 |   struct DataDescriptor_32 {
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSSet.cpp:183: note: a different
type is defined in another translation unit
  183 |   struct DataDescriptor_32 {
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:315: note: the
first difference of corresponding definitions is field ‘_buffer’
  315 | uint32_t _buffer;
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSSet.cpp:184: note: a field
with different name is defined in another translation unit
  184 | uint32_t _cow;
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:327: warning:
type ‘struct DataDescriptor_64’ violates the C++ One Definition Rule [-Wodr]
  327 |   struct DataDescriptor_64 {
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSSet.cpp:192: note: a different
type is defined in another translation unit
  192 |   struct DataDescriptor_64 {
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp:328: note: the
first difference of corresponding definitions is field ‘_buffer’
  328 | uint64_t _buffer;
  | 
llvm-project/lldb/source/Plugins/Language/ObjC/NSSet.cpp:193: note: a field
with different name is defined in another translation unit
  193 | uint64_t _cow;
  | 
llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:136:
warning: ‘LLDBSwigPython_GetIndexOfChildWithName’ violates the C++ One
Definition Rule [-Wodr]
  136 | extern "C" int LLDBSwigPython_GetIndexOfChildWithName(void
*implementor,
  | 
tools/lldb/bindings/LLDBWrapPython.cpp:79668:1: note:
‘LLDBSwigPython_GetIndexOfChildWithName’ was previously declared here
79668 | LLDBSwigPython_GetIndexOfChildWithName
  | ^
llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:97:
warning: ‘LLDBSwigPythonCallTypeScript’ violates the C++ One Definition Rule
[-Wodr]
   97 | extern "C" bool LLDBSwigPythonCallTypeScript(
  | 
tools/lldb/bindings/LLDBWrapPython.cpp:79221:1: note:
‘LLDBSwigPythonCallTypeScript’ was previously declared here
79221 | LLDBSwigPythonCallTypeScript
  | ^
llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:160:
warning: ‘LLDBSwigPythonCallCommandObject’ violates the C++ One Definition Rule
[-Wodr]
  160 | LLDBSwigPythonCallCommandObject(void *implementor, lldb::DebuggerSP
&debugger,
  | 
tools/lldb/bindings/LLDBWrapPython.cpp:79823:1: note:
‘LLDBSwigPythonCallCommandObject’ was previously declared here
79823 | LLDBSwigPythonCallCommandObject
  | ^
llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:180:
warning: ‘LLDBSwigPython_GetRecognizedArguments’ violates the C++ One
Definition Rule [-Wodr]
  180 | LLDBSwigPython_GetRecognizedArguments(void *imple

[lldb-dev] LLDB SBAPI questions

2020-07-14 Thread Vadim Chugunov via lldb-dev
Hi,
I've a couple of questions:

1. Is there a way to get numeric values of C++ template parameters?
SBType has a method for discovering argument kind and type, but I couldn't
find anything for values.

2. Can I enumerate static variables of a class via SBType?  (and read their
values)

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


Re: [lldb-dev] [Release-testers] 10.0.1-rc4 tagged

2020-07-14 Thread Tom Stellard via lldb-dev

On 7/9/20 7:42 PM, Brian Cain wrote:

Uploaded:
dcf43e25a77a2ffb4ffaa5a04babe409b2b3ffac07bc989a1dca730ecacb43c2 
  clang+llvm-10.0.1-rc4-x86_64-linux-sles12.4.tar.xz
6db54d9f55fb41877b23f4b89e7b68d44fcc5378d615d232c820307237dc33f7 
  clang+llvm-10.0.1-rc2-x86_64-linux-sles12.4.tar.xz
2d907945d8d8d5d2969c6947c50d91e100d5dd09ccb37214a811c11cbfa635af 
  clang+llvm-10.0.1-rc3-x86_64-linux-sles12.4.tar.xz


ccdfda65932661e5fd4faba1fde17fe3800f39b4c21687242b7cdfdbea4cf131 
  clang+llvm-10.0.1-rc3-x86_64-linux-gnu-ubuntu-16.04.tar.xz
761a6f4658545f733f14dcd6c50a16b49994a4c448c779616c5716eed80b90f1 
  clang+llvm-10.0.1-rc4-x86_64-linux-gnu-ubuntu-16.04.tar.xz


I saw phase2/3 mismatches that seem concerning.  Are these the only 
platforms that encountered them?


I can open a bug, let me know if there's particular data beyond the logs 
I should gather.




Can you attach 2 of the binary files the are different?

-Tom



On Tue, Jul 7, 2020 at 11:08 PM Tom Stellard via Release-testers 
mailto:release-test...@lists.llvm.org>> 
wrote:


Hi,

I've tagged 10.0.1-rc4, please test and report the results.

-Tom

___
Release-testers mailing list
release-test...@lists.llvm.org 
https://lists.llvm.org/cgi-bin/mailman/listinfo/release-testers



--
-Brian


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