[Bug 15439] New: Expression evaluation can assert with invalid context

Bug ID 15439
Summary Expression evaluation can assert with invalid context
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity enhancement
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter ashok.thirumurthi@intel.com
Classification Unclassified

When expression evaluation is performed while stopped in an inlined method, and
the inferior has been compiled with gcc, the variable list for the function
block may not include the 'this' pointer.  Specifically, when the inlined
method is not called from a method of the same struct or class, the following
assertion occurs:

'Stopped in a C++ method, but 'this' isn't available; pretending we are in a
generic context'

Reproduced using gcc 4.6.3 on Ubuntu 12.04 with:
  ./dotest.py -v -C gcc lang/cpp/this

Note that the above test passes with clang, and the test passes if the method
is not decorated with always_inline.  A variant on the above test passes if the
always_inline method is called from a method with default attributes.

Ashok Thirumurthi changed bug 15439

What Removed Added
Assignee lldb-dev@cs.uiuc.edu ashok.thirumurthi@intel.com

Comment # 1 on bug 15439 from Ashok Thirumurthi

Let's look at the DWARF in the corresponding .o file; this may be a bug for
GCC.