[lldb-dev] [Bug 26710] TestInlines fails on Linux with gcc

2021-06-11 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=26710

Raphael Isemann  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||teempe...@gmail.com
 Resolution|--- |FIXED

--- Comment #3 from Raphael Isemann  ---
This test XPASSES now with GCC>8.5. I'll close this bug and re-enable the test
in e2d0798bc3e462738c557270528e8a983df0cf02

-- 
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 50685] New: LLDB sometimes can't determine the dynamic type of an object if the program is compiled with fPIC

2021-06-11 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=50685

Bug ID: 50685
   Summary: LLDB sometimes can't determine the dynamic type of an
object if the program is compiled with fPIC
   Product: lldb
   Version: 12.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: officesamu...@gmail.com
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

If I compile the following code with fPIC or fPIE:
===
#include 
#include 

void foo(boost::asio::io_context& context)
{
boost::asio::io_context::strand s{context};
}

struct Base
{
virtual ~Base() {}
};

struct Derived: Base
{
Derived(int zzz) : zzz(zzz) {}

int zzz = 0;
};

int main()
{
Derived d{123};
Base* b = &d;

return 0;
}
===
and run it in lldb, "print b" will print:
(Base *) $0 = 0x7fffdc58

But if I compile it without fPIC/fPIE, or modify the code slightly, e.g. by
commenting out the unused function "foo", I get the expected output:
(Derived *) $0 = 0x7fffdc58

The behaviour doesn't depend on the compiler; I tried clang 11.0 and gcc-10.2
and the result was the same.

Since the code depends on boost, I'm attaching the preprocessed version too.

I compile it as follows:
$ clang++ -g -fPIC test_preproc_clang.cpp -o test -lpthread

Clang version:
Ubuntu clang version 11.0.0-2

LLDB version:
lldb version 12.0.0 (g...@github.com:llvm/llvm-project.git revision
d28af7c654d8db0b68c175db5ce212d74fb5e9bc)
  clang revision d28af7c654d8db0b68c175db5ce212d74fb5e9bc
  llvm revision d28af7c654d8db0b68c175db5ce212d74fb5e9bc

boost version: 1.73.0

-- 
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