Index: include/lldb/API/SBDebugger.h
===================================================================
--- include/lldb/API/SBDebugger.h	(revision 185260)
+++ include/lldb/API/SBDebugger.h	(working copy)
@@ -199,6 +199,9 @@
     static bool
     StateIsStoppedState (lldb::StateType state);
     
+    static lldb::SBStringList
+    GetAvailableArchsFromFile(const char* filename);
+
     bool
     EnableLog (const char *channel, const char **categories);
 
Index: source/API/SBDebugger.cpp
===================================================================
--- source/API/SBDebugger.cpp	(revision 185260)
+++ source/API/SBDebugger.cpp	(working copy)
@@ -37,12 +37,14 @@
 
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/State.h"
+#include "lldb/Core/ModuleSpec.h"
 #include "lldb/DataFormatters/DataVisualization.h"
 #include "lldb/Interpreter/Args.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/OptionGroupPlatform.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/TargetList.h"
+#include "lldb/Symbol/ObjectFile.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -515,6 +517,44 @@
     return result;
 }
 
+SBStringList
+SBDebugger::GetAvailableArchsFromFile(const char* filename)
+{
+    Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+    SBStringList archs;
+
+    ModuleSP module_sp;
+    FileSpec file_spec(filename, true);
+    Host::ResolveExecutableInBundle(file_spec);
+    //file_spec.ResolveExecutableLocation();
+    ModuleSpecList specs;
+    size_t count = ObjectFile::GetModuleSpecifications(file_spec, 0, specs);
+    size_t num = specs.GetSize();
+
+    if (log)
+        log->Printf("SBDebugger::GetModuleSpecifications: (count = %d)\n", num);
+
+    for (int32_t i = 0; i < num; i++)
+    {
+        ModuleSpec module_spec;
+        bool res = specs.GetModuleSpecAtIndex(i, module_spec);
+
+        if (!res)
+        {
+            if (log)
+                log->Printf("SBDebugger::GetModuleSpecAtIndex (index = %d) error\n", i);
+        }
+
+        const ArchSpec& arch = module_spec.GetArchitecture();
+
+        const char* archname = arch.GetArchitectureName();
+        archs.AppendString(archname);
+    }
+
+    return archs;
+}
+
 lldb::SBTarget
 SBDebugger::CreateTarget (const char *filename,
                           const char *target_triple,
