First part of an attempt to indicate to the user when they are
authorJason Molenda <jmolenda@apple.com>
Wed, 29 Jul 2015 00:42:47 +0000 (00:42 +0000)
committerJason Molenda <jmolenda@apple.com>
Wed, 29 Jul 2015 00:42:47 +0000 (00:42 +0000)
commit6ab659a922bf919764dc5dd7a6c47e61b35bbde5
tree580953d5861477e1209e9c83e4d40fc77ae764fd
parentff244c1d9754b0632401a2bd36612afb7392cf44
First part of an attempt to indicate to the user when they are
debugging optimized code.  Adds new methods on Function/SBFunction
to query whether a given function is optimized.  Adds a new
function.is-optimized format entity and changes the default
frame-format to append "[opt]" if the function was built with
optimization.

The only indication that a binary was built with optimization
that we have right now is the presence of the DW_AT_APPLE_optimized
attribute (DW_FORM_flag value 1) in the DW_TAG_compile_unit.
The absence of this flag may mean that the compile_unit was not
compiled with optimization, or it may mean that the producer
does not generate this attribute.

Currently this only works for dSYM debugging.  When we create
the CompileUnit with dwarf-in-.o-file debugging we don't have
the attribute value yet so it's not set.  I need to find the
flag value when we do start to read the .o file DWARF and
set the CompileUnit's status at that point - but haven't
done it yet.

I'm also going to add a mechanism for issuing warnings to users
such that they're only issued once in a debug session and
there is away for users to suppress these warnings altogether
via .lldbinit file settings.  But I want to get this changeset
committed now that it's at a useful state.

<rdar://problem/19281172>

llvm-svn: 243508
13 files changed:
lldb/include/lldb/API/SBFunction.h
lldb/include/lldb/Core/FormatEntity.h
lldb/include/lldb/Symbol/CompileUnit.h
lldb/include/lldb/Symbol/Function.h
lldb/scripts/interface/SBFunction.i
lldb/source/API/SBFunction.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/FormatEntity.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
lldb/source/Symbol/CompileUnit.cpp
lldb/source/Symbol/Function.cpp