Hi,

This patch fixes assertion for i386 process on x86_64 linux host.
Static variables with the same name in different functions are different
variables.

-- 
Best Regards, Tong Shen
Index: source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp
===================================================================
--- source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp	(revision 215362)
+++ source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp	(working copy)
@@ -80,10 +80,10 @@
 #include "RegisterInfos_x86_64.h"
 #undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
 
+static std::vector<lldb_private::RegisterInfo> g_register_infos;
 static std::vector<lldb_private::RegisterInfo>&
 GetPrivateRegisterInfoVector ()
 {
-    static std::vector<lldb_private::RegisterInfo> g_register_infos;
     return g_register_infos;
 }
 
@@ -90,8 +90,6 @@
 static const RegisterInfo *
 GetRegisterInfo_i386(const lldb_private::ArchSpec &arch)
 {
-    static std::vector<lldb_private::RegisterInfo> g_register_infos (GetPrivateRegisterInfoVector ());
-
     // Allocate RegisterInfo only once
     if (g_register_infos.empty())
     {
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to