[Lldb-commits] [PATCH] Fix assertion for i386 process on x86_64 linux host
Todd Fiala
tfiala at google.com
Mon Aug 11 22:36:26 PDT 2014
Submitted:
svn commit
Sending source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp
Transmitting file data .
Committed revision 215424.
On Mon, Aug 11, 2014 at 10:33 PM, Todd Fiala <tfiala at google.com> wrote:
> Okay, I'll get this in.
>
> We'll work on a regression test for this tomorrow.
>
>
> On Mon, Aug 11, 2014 at 9:20 PM, Tong Shen <endlessroad at google.com> wrote:
>
>> Works like a charm :-)
>> Confirmed, please merge.
>>
>>
>> On Mon, Aug 11, 2014 at 8:01 PM, Todd Fiala <tfiala at google.com> wrote:
>>
>>> Hey Tong,
>>>
>>> I think the intent here was simply a mistake of forgetting a reference.
>>> Let's go with a simpler fix:
>>>
>>> Index: source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp
>>> ===================================================================
>>> --- source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp (revision
>>> 215418)
>>> +++ source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp (working
>>> copy)
>>> @@ -90,7 +90,7 @@
>>> static const RegisterInfo *
>>> GetRegisterInfo_i386(const lldb_private::ArchSpec &arch)
>>> {
>>> - static std::vector<lldb_private::RegisterInfo> g_register_infos
>>> (GetPrivateRegisterInfoVector ());
>>> + std::vector<lldb_private::RegisterInfo> &g_register_infos =
>>> GetPrivateRegisterInfoVector ();
>>>
>>> // Allocate RegisterInfo only once
>>> if (g_register_infos.empty())
>>>
>>> This removes the need for the global destructor and doesn't pay a price
>>> if that register info type is never hit.
>>>
>>> Can you verify if this patch still fixes the issue? If so, I'd rather
>>> go with this.
>>>
>>> Thanks!
>>>
>>> -Todd
>>>
>>>
>>>
>>>
>>> On Mon, Aug 11, 2014 at 3:43 PM, Tong Shen <endlessroad at google.com>
>>> wrote:
>>>
>>>> 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
>>>>
>>>> _______________________________________________
>>>> lldb-commits mailing list
>>>> lldb-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>>>>
>>>>
>>>
>>>
>>> --
>>> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>>>
>>
>>
>>
>> --
>> Best Regards, Tong Shen
>>
>
>
>
> --
> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>
--
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140811/ec4c7a43/attachment.html>
More information about the lldb-commits
mailing list