[Lldb-commits] [lldb] r203107 - Fix Windows build break introduced in r203035.

Virgile Bello virgile.bello at gmail.com
Mon Mar 10 09:16:21 PDT 2014


Small update: looks like it compiles fine on Linux.
Let me know if I should commit.


On 9 March 2014 23:30, Virgile Bello <virgile.bello at gmail.com> wrote:

> Ok here is the patch. Moved most RegisterContext* files from
> PluginProcessPOSIX to PluginProcessUtility.
>
> It fixes windows build. Didn't test it yet on Linux, so might be a few
> things I missed, but no reason it shouldn't work.
>
>
> On 9 March 2014 21:48, Virgile Bello <virgile.bello at gmail.com> wrote:
>
>> Seems that it still relies on RegisterContextLinux/POSIX to be available.
>> Shouldn't RegisterContext classes be moved from PluginProcessPOSIX to
>> PluginProcessUtility?
>>
>> BTW, I also had some code in Process/Thread implementations that I wanted
>> to share between POSIX and Windows, would PluginProcessUtility be a good
>> location to do a common base class for ProcessPOSIX/ProcessWindows and
>> ThreadPOSIX/ThreadWindows?
>>
>>
>> On 9 March 2014 20:40, Virgile Bello <virgile.bello at gmail.com> wrote:
>>
>>> Ok I think I fixed it on my build, will commit it soon.
>>>
>>>
>>> On 8 March 2014 05:42, Greg Clayton <gclayton at apple.com> wrote:
>>>
>>>> The logging is just used in one spot in ProcessELFCore, I would switch
>>>> the include from:
>>>>
>>>> #include "ProcessPOSIXLog.h"
>>>>
>>>> to:
>>>>
>>>> #include "lldb/lldb-private-log.h"
>>>>
>>>> And change the logging from:
>>>>
>>>>     Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet
>>>> (POSIX_LOG_PROCESS));
>>>>
>>>> to:
>>>>
>>>>     Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
>>>>
>>>>
>>>> Let me know if this fixes your issues?
>>>>
>>>> On Mar 6, 2014, at 9:00 PM, Ahmed Charles <acharles at outlook.com> wrote:
>>>>
>>>> > Unfortunately, adding ProcessElfCore and JITLoaderGDB to the cmake
>>>> build isn't 'obvious', since ProcessElfCore replies on ProcessPOSIXLog.h,
>>>> which is in the ProcessPOSIX plugin, which is also not built on Windows. I
>>>> don't know if that plugin is supported on Windows, for remote debugging or
>>>> not, so adding it would be premature.
>>>> >
>>>> > Any advice would be appreciated.
>>>> >
>>>> >
>>>> > ----------------------------------------
>>>> >> From: gclayton at apple.com
>>>> >> Date: Thu, 6 Mar 2014 15:36:55 -0800
>>>> >> To: ahmedcharles at gmail.com
>>>> >> CC: lldb-commits at cs.uiuc.edu
>>>> >> Subject: Re: [Lldb-commits] [lldb] r203107 - Fix Windows build break
>>>> introduced in r203035.
>>>> >>
>>>> >> JITLoader and ProcessELFCore should be able to build on any system
>>>> so that you can use this functionality to do remote debugging.
>>>> >>
>>>> >> I reverted your patch with:
>>>> >>
>>>> >> % svn commit
>>>> >> Sending source/lldb.cpp
>>>> >> Transmitting file data .
>>>> >> Committed revision 203178.
>>>> >>
>>>> >> The real fix for Windows is to make sure it builds all that it needs
>>>> to in order to support ProcessElfCore and JITLoaderGDB. That probably means
>>>> fixing the Makefiles or CMakeList.txt files.
>>>> >>
>>>> >> On Mar 6, 2014, at 3:30 AM, Ahmed Charles <ahmedcharles at gmail.com>
>>>> wrote:
>>>> >>
>>>> >>> Author: ace2001ac
>>>> >>> Date: Thu Mar 6 05:30:34 2014
>>>> >>> New Revision: 203107
>>>> >>>
>>>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=203107&view=rev
>>>> >>> Log:
>>>> >>> Fix Windows build break introduced in r203035.
>>>> >>>
>>>> >>> Add '#if defined(__linux__) || defined(__FreeBSD__)' around
>>>> JITLoaderGDB
>>>> >>> and ProcessElfCore, which are only built on Linux and FreeBSD.
>>>> >>>
>>>> >>> Modified:
>>>> >>> lldb/trunk/source/lldb.cpp
>>>> >>>
>>>> >>> Modified: lldb/trunk/source/lldb.cpp
>>>> >>> URL:
>>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb.cpp?rev=203107&r1=203106&r2=203107&view=diff
>>>> >>>
>>>> ==============================================================================
>>>> >>> --- lldb/trunk/source/lldb.cpp (original)
>>>> >>> +++ lldb/trunk/source/lldb.cpp Thu Mar 6 05:30:34 2014
>>>> >>> @@ -124,8 +124,10 @@ lldb_private::Initialize ()
>>>> >>> ScriptInterpreterPython::InitializePrivate();
>>>> >>> OperatingSystemPython::Initialize();
>>>> >>> #endif
>>>> >>> +#if defined(__linux__) || defined(__FreeBSD__)
>>>> >>> JITLoaderGDB::Initialize();
>>>> >>> ProcessElfCore::Initialize();
>>>> >>> +#endif
>>>> >>>
>>>> >>> #if defined (__APPLE__)
>>>> >>>
>>>> //----------------------------------------------------------------------
>>>> >>> @@ -208,9 +210,11 @@ lldb_private::Terminate ()
>>>> >>> #ifndef LLDB_DISABLE_PYTHON
>>>> >>> OperatingSystemPython::Terminate();
>>>> >>> #endif
>>>> >>> +#if defined(__linux__) || defined(__FreeBSD__)
>>>> >>> JITLoaderGDB::Terminate();
>>>> >>> ProcessElfCore::Terminate();
>>>> >>> -
>>>> >>> +#endif
>>>> >>> +
>>>> >>> #if defined (__APPLE__)
>>>> >>> DynamicLoaderMacOSXDYLD::Terminate();
>>>> >>> DynamicLoaderDarwinKernel::Terminate();
>>>> >>>
>>>> >>>
>>>> >>> _______________________________________________
>>>> >>> lldb-commits mailing list
>>>> >>> lldb-commits at cs.uiuc.edu
>>>> >>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>>>> >>
>>>> >> _______________________________________________
>>>> >> lldb-commits mailing list
>>>> >> lldb-commits at cs.uiuc.edu
>>>> >> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>>>>
>>>> _______________________________________________
>>>> lldb-commits mailing list
>>>> lldb-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140311/ccd22886/attachment.html>


More information about the lldb-commits mailing list