[Lldb-commits] [lldb] r176206 - Add GNU indirect function support in expressions for Linux.
Matt Kopec
Matt.Kopec at intel.com
Wed Feb 27 12:13:38 PST 2013
Author: mkopec
Date: Wed Feb 27 14:13:38 2013
New Revision: 176206
URL: http://llvm.org/viewvc/llvm-project?rev=176206&view=rev
Log:
Add GNU indirect function support in expressions for Linux.
Modified:
lldb/trunk/include/lldb/Core/Address.h
lldb/trunk/include/lldb/Symbol/Symbol.h
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h
lldb/trunk/include/lldb/lldb-enumerations.h
lldb/trunk/source/Core/Address.cpp
lldb/trunk/source/Core/Module.cpp
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h
lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.h
lldb/trunk/source/Symbol/Symbol.cpp
lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
lldb/trunk/test/lang/c/strings/TestCStrings.py
Modified: lldb/trunk/include/lldb/Core/Address.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Address.h?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Address.h (original)
+++ lldb/trunk/include/lldb/Core/Address.h Wed Feb 27 14:13:38 2013
@@ -302,7 +302,7 @@ public:
/// the address is currently not loaded.
//------------------------------------------------------------------
lldb::addr_t
- GetCallableLoadAddress (Target *target) const;
+ GetCallableLoadAddress (Target *target, bool is_indirect = false) const;
//------------------------------------------------------------------
/// Get the load address as an opcode load address.
Modified: lldb/trunk/include/lldb/Symbol/Symbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symbol.h?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symbol.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symbol.h Wed Feb 27 14:13:38 2013
@@ -205,6 +205,9 @@ public:
bool
IsTrampoline () const;
+ bool
+ IsIndirect () const;
+
lldb::addr_t
GetByteSize () const;
Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Wed Feb 27 14:13:38 2013
@@ -2894,6 +2894,28 @@ public:
lldb::addr_t
AllocateMemory (size_t size, uint32_t permissions, Error &error);
+
+ //------------------------------------------------------------------
+ /// Resolve dynamically loaded indirect functions.
+ ///
+ /// @param[in] address
+ /// The load address of the indirect function to resolve.
+ ///
+ /// @param[out] error
+ /// An error value in case the resolve fails.
+ ///
+ /// @return
+ /// The address of the resolved function.
+ /// LLDB_INVALID_ADDRESS if the resolution failed.
+ //------------------------------------------------------------------
+
+ virtual lldb::addr_t
+ ResolveIndirectFunction(const Address *address, Error &error)
+ {
+ error.SetErrorStringWithFormat("error: %s does not support indirect functions in the debug process", GetShortPluginName());
+ return LLDB_INVALID_ADDRESS;
+ }
+
virtual Error
GetMemoryRegionInfo (lldb::addr_t load_addr,
MemoryRegionInfo &range_info)
Modified: lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanCallFunction.h Wed Feb 27 14:13:38 2013
@@ -27,7 +27,7 @@ class ThreadPlanCallFunction : public Th
// return type, otherwise just pass in an invalid ClangASTType.
public:
ThreadPlanCallFunction (Thread &thread,
- Address &function,
+ const Address &function,
const ClangASTType &return_type,
lldb::addr_t arg,
bool stop_other_threads,
@@ -37,7 +37,7 @@ public:
lldb::addr_t *cmd_arg = 0);
ThreadPlanCallFunction (Thread &thread,
- Address &function,
+ const Address &function,
const ClangASTType &return_type,
bool stop_other_threads,
bool unwind_on_error,
Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Wed Feb 27 14:13:38 2013
@@ -455,6 +455,7 @@ namespace lldb {
eSymbolTypeInvalid = 0,
eSymbolTypeAbsolute,
eSymbolTypeCode,
+ eSymbolTypeResolver,
eSymbolTypeData,
eSymbolTypeTrampoline,
eSymbolTypeRuntime,
Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Wed Feb 27 14:13:38 2013
@@ -311,8 +311,15 @@ Address::GetLoadAddress (Target *target)
}
addr_t
-Address::GetCallableLoadAddress (Target *target) const
+Address::GetCallableLoadAddress (Target *target, bool is_indirect) const
{
+ if (is_indirect && target) {
+ ProcessSP processSP = target->GetProcessSP();
+ Error error;
+ if (processSP.get())
+ return processSP->ResolveIndirectFunction(this, error);
+ }
+
addr_t code_addr = GetLoadAddress (target);
if (target)
Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Wed Feb 27 14:13:38 2013
@@ -606,7 +606,7 @@ Module::FindFunctions (const ConstString
if (symtab)
{
std::vector<uint32_t> symbol_indexes;
- symtab->FindAllSymbolsWithNameAndType (name, eSymbolTypeCode, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
+ symtab->FindAllSymbolsWithNameAndType (name, eSymbolTypeAny, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
const size_t num_matches = symbol_indexes.size();
if (num_matches)
{
@@ -615,7 +615,10 @@ Module::FindFunctions (const ConstString
for (size_t i=0; i<num_matches; i++)
{
sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]);
- sc_list.AppendIfUnique (sc, merge_symbol_into_function);
+ SymbolType sym_type = sc.symbol->GetType();
+ if (sc.symbol && (sym_type == eSymbolTypeCode ||
+ sym_type == eSymbolTypeResolver))
+ sc_list.AppendIfUnique (sc, merge_symbol_into_function);
}
}
}
@@ -649,7 +652,7 @@ Module::FindFunctions (const RegularExpr
if (symtab)
{
std::vector<uint32_t> symbol_indexes;
- symtab->AppendSymbolIndexesMatchingRegExAndType (regex, eSymbolTypeCode, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
+ symtab->AppendSymbolIndexesMatchingRegExAndType (regex, eSymbolTypeAny, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
const size_t num_matches = symbol_indexes.size();
if (num_matches)
{
@@ -658,7 +661,10 @@ Module::FindFunctions (const RegularExpr
for (size_t i=0; i<num_matches; i++)
{
sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]);
- sc_list.AppendIfUnique (sc, merge_symbol_into_function);
+ SymbolType sym_type = sc.symbol->GetType();
+ if (sc.symbol && (sym_type == eSymbolTypeCode ||
+ sym_type == eSymbolTypeResolver))
+ sc_list.AppendIfUnique (sc, merge_symbol_into_function);
}
}
}
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Wed Feb 27 14:13:38 2013
@@ -696,11 +696,32 @@ FindCodeSymbolInContext
SymbolContextList &sc_list
)
{
+ SymbolContextList temp_sc_list;
if (sym_ctx.module_sp)
- sym_ctx.module_sp->FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list);
+ sym_ctx.module_sp->FindSymbolsWithNameAndType(name, eSymbolTypeAny, temp_sc_list);
- if (!sc_list.GetSize())
- sym_ctx.target_sp->GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list);
+ if (!sc_list.GetSize() && sym_ctx.target_sp)
+ sym_ctx.target_sp->GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeAny, temp_sc_list);
+
+ unsigned temp_sc_list_size = temp_sc_list.GetSize();
+ for (unsigned i = 0; i < temp_sc_list_size; i++)
+ {
+ SymbolContext sym_ctx;
+ temp_sc_list.GetContextAtIndex(i, sym_ctx);
+ if (sym_ctx.symbol)
+ {
+ switch (sym_ctx.symbol->GetType())
+ {
+ case eSymbolTypeCode:
+ case eSymbolTypeResolver:
+ sc_list.Append(sym_ctx);
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
}
bool
@@ -724,7 +745,7 @@ ClangExpressionDeclMap::GetFunctionAddre
SymbolContextList sc_list;
FindCodeSymbolInContext(name, m_parser_vars->m_sym_ctx, sc_list);
-
+
if (!sc_list.GetSize())
{
// We occasionally get debug information in which a const function is reported
@@ -746,23 +767,25 @@ ClangExpressionDeclMap::GetFunctionAddre
if (!sc_list.GetSize())
return false;
-
+
SymbolContext sym_ctx;
sc_list.GetContextAtIndex(0, sym_ctx);
-
+
const Address *func_so_addr = NULL;
-
+ bool is_indirect_function = false;
+
if (sym_ctx.function)
func_so_addr = &sym_ctx.function->GetAddressRange().GetBaseAddress();
- else if (sym_ctx.symbol)
+ else if (sym_ctx.symbol) {
func_so_addr = &sym_ctx.symbol->GetAddress();
- else
+ is_indirect_function = sym_ctx.symbol->IsIndirect();
+ } else
return false;
-
+
if (!func_so_addr || !func_so_addr->IsValid())
return false;
-
- func_addr = func_so_addr->GetCallableLoadAddress (target);
+
+ func_addr = func_so_addr->GetCallableLoadAddress (target, is_indirect_function);
return true;
}
@@ -795,7 +818,11 @@ ClangExpressionDeclMap::GetSymbolAddress
case eSymbolTypeTrampoline:
symbol_load_addr = sym_address->GetCallableLoadAddress (&target);
break;
-
+
+ case eSymbolTypeResolver:
+ symbol_load_addr = sym_address->GetCallableLoadAddress (&target, true);
+ break;
+
case eSymbolTypeData:
case eSymbolTypeRuntime:
case eSymbolTypeVariable:
@@ -2467,6 +2494,7 @@ ClangExpressionDeclMap::FindGlobalDataSy
case eSymbolTypeCompiler:
case eSymbolTypeInstrumentation:
case eSymbolTypeUndefined:
+ case eSymbolTypeResolver:
break;
}
}
@@ -3540,7 +3568,9 @@ ClangExpressionDeclMap::AddOneFunction (
// only valid for Functions, not for Symbols
void *fun_opaque_type = NULL;
ASTContext *fun_ast_context = NULL;
-
+
+ bool is_indirect_function = false;
+
if (fun)
{
Type *fun_type = fun->GetType();
@@ -3586,6 +3616,7 @@ ClangExpressionDeclMap::AddOneFunction (
{
fun_address = &symbol->GetAddress();
fun_decl = context.AddGenericFunDecl();
+ is_indirect_function = symbol->IsIndirect();
}
else
{
@@ -3596,7 +3627,7 @@ ClangExpressionDeclMap::AddOneFunction (
Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
- lldb::addr_t load_addr = fun_address->GetCallableLoadAddress(target);
+ lldb::addr_t load_addr = fun_address->GetCallableLoadAddress(target, is_indirect_function);
fun_location->SetValueType(Value::eValueTypeLoadAddress);
fun_location->GetScalar() = load_addr;
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Feb 27 14:13:38 2013
@@ -784,6 +784,12 @@ ParseSymbols(Symtab *symtab,
// STB_LOCAL symbols for the file, if it is present.
symbol_type = eSymbolTypeObjectFile;
break;
+
+ case STT_GNU_IFUNC:
+ // The symbol is associated with an indirect function. The actual
+ // function will be resolved if it is referenced.
+ symbol_type = eSymbolTypeResolver;
+ break;
}
}
Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Wed Feb 27 14:13:38 2013
@@ -483,6 +483,19 @@ ProcessPOSIX::DoDeallocateMemory(lldb::a
return error;
}
+addr_t
+ProcessPOSIX::ResolveIndirectFunction(const Address *address, Error &error)
+{
+ addr_t function_addr = LLDB_INVALID_ADDRESS;
+ if (address == NULL) {
+ error.SetErrorStringWithFormat("unable to determine direct function call for NULL address");
+ } else if (!InferiorCall(this, address, function_addr)) {
+ function_addr = LLDB_INVALID_ADDRESS;
+ error.SetErrorStringWithFormat("unable to determine direct function call for indirect function with address %x", address);
+ }
+ return function_addr;
+}
+
size_t
ProcessPOSIX::GetSoftwareBreakpointTrapOpcode(BreakpointSite* bp_site)
{
Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h Wed Feb 27 14:13:38 2013
@@ -96,6 +96,9 @@ public:
virtual lldb_private::Error
DoDeallocateMemory(lldb::addr_t ptr);
+ virtual lldb::addr_t
+ ResolveIndirectFunction(const lldb_private::Address *address, lldb_private::Error &error);
+
virtual size_t
GetSoftwareBreakpointTrapOpcode(lldb_private::BreakpointSite* bp_site);
Modified: lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp Wed Feb 27 14:13:38 2013
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "InferiorCallPOSIX.h"
+#include "lldb/Core/Address.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Symbol/ClangASTContext.h"
@@ -119,6 +120,11 @@ bool lldb_private::InferiorCallMmap(Proc
if (allocated_addr == UINT32_MAX)
return false;
}
+ else if (process->GetAddressByteSize() == 8)
+ {
+ if (allocated_addr == UINT64_MAX)
+ return false;
+ }
return true;
}
}
@@ -203,3 +209,66 @@ bool lldb_private::InferiorCallMunmap(Pr
return false;
}
+
+bool lldb_private::InferiorCall(Process *process, const Address *address, addr_t &returned_func) {
+ Thread *thread = process->GetThreadList().GetSelectedThread().get();
+ if (thread == NULL || address == NULL)
+ return false;
+
+ const bool stop_other_threads = true;
+ const bool unwind_on_error = true;
+ const bool ignore_breakpoints = true;
+ const bool try_all_threads = true;
+ const uint32_t timeout_usec = 500000;
+
+ ClangASTContext *clang_ast_context = process->GetTarget().GetScratchClangASTContext();
+ lldb::clang_type_t clang_void_ptr_type = clang_ast_context->GetVoidPtrType(false);
+ ThreadPlanCallFunction *call_function_thread_plan
+ = new ThreadPlanCallFunction (*thread,
+ *address,
+ ClangASTType (clang_ast_context->getASTContext(), clang_void_ptr_type),
+ stop_other_threads,
+ unwind_on_error,
+ ignore_breakpoints);
+ lldb::ThreadPlanSP call_plan_sp (call_function_thread_plan);
+ if (call_plan_sp)
+ {
+ StreamFile error_strm;
+ // This plan is a utility plan, so set it to discard itself when done.
+ call_plan_sp->SetIsMasterPlan (true);
+ call_plan_sp->SetOkayToDiscard(true);
+
+ StackFrame *frame = thread->GetStackFrameAtIndex (0).get();
+ if (frame)
+ {
+ ExecutionContext exe_ctx;
+ frame->CalculateExecutionContext (exe_ctx);
+ ExecutionResults result = process->RunThreadPlan (exe_ctx,
+ call_plan_sp,
+ stop_other_threads,
+ try_all_threads,
+ unwind_on_error,
+ ignore_breakpoints,
+ timeout_usec,
+ error_strm);
+ if (result == eExecutionCompleted)
+ {
+ returned_func = call_plan_sp->GetReturnValueObject()->GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
+
+ if (process->GetAddressByteSize() == 4)
+ {
+ if (returned_func == UINT32_MAX)
+ return false;
+ }
+ else if (process->GetAddressByteSize() == 8)
+ {
+ if (returned_func == UINT64_MAX)
+ return false;
+ }
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
Modified: lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.h?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.h Wed Feb 27 14:13:38 2013
@@ -36,6 +36,8 @@ bool InferiorCallMmap(Process *proc, lld
bool InferiorCallMunmap(Process *proc, lldb::addr_t addr, lldb::addr_t length);
+bool InferiorCall(Process *proc, const Address *address, lldb::addr_t &returned_func);
+
} // namespace lldb_private
#endif // lldb_InferiorCallPOSIX_h_
Modified: lldb/trunk/source/Symbol/Symbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symbol.cpp?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symbol.cpp (original)
+++ lldb/trunk/source/Symbol/Symbol.cpp Wed Feb 27 14:13:38 2013
@@ -184,6 +184,12 @@ Symbol::IsTrampoline () const
return m_type == eSymbolTypeTrampoline;
}
+bool
+Symbol::IsIndirect () const
+{
+ return m_type == eSymbolTypeResolver;
+}
+
void
Symbol::GetDescription (Stream *s, lldb::DescriptionLevel level, Target *target) const
{
@@ -273,7 +279,7 @@ Symbol::Dump(Stream *s, Target *target,
uint32_t
Symbol::GetPrologueByteSize ()
{
- if (m_type == eSymbolTypeCode)
+ if (m_type == eSymbolTypeCode || m_type == eSymbolTypeResolver)
{
if (!m_type_data_resolved)
{
Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Wed Feb 27 14:13:38 2013
@@ -119,7 +119,7 @@ ThreadPlanCallFunction::ConstructorSetup
}
ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
- Address &function,
+ const Address &function,
const ClangASTType &return_type,
addr_t arg,
bool stop_other_threads,
@@ -182,7 +182,7 @@ ThreadPlanCallFunction::ThreadPlanCallFu
ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
- Address &function,
+ const Address &function,
const ClangASTType &return_type,
bool stop_other_threads,
bool unwind_on_error,
Modified: lldb/trunk/test/lang/c/strings/TestCStrings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/strings/TestCStrings.py?rev=176206&r1=176205&r2=176206&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/strings/TestCStrings.py (original)
+++ lldb/trunk/test/lang/c/strings/TestCStrings.py Wed Feb 27 14:13:38 2013
@@ -16,7 +16,6 @@ class CStringsTestCase(TestBase):
self.buildDsym()
self.static_method_commands()
- @expectedFailureLinux # bugzilla 14437
@dwarf_test
def test_with_dwarf_and_run_command(self):
"""Tests that C strings work as expected in expressions"""
@@ -43,6 +42,7 @@ class CStringsTestCase(TestBase):
self.expect("expression -- z[2]",
startstr = "(const char) $1 = 'x'")
+ # On Linux, the expression below will test GNU indirect function calls.
self.expect("expression -- (int)strlen(\"hello\")",
startstr = "(int) $2 = 5")
More information about the lldb-commits
mailing list