[Lldb-commits] [lldb] r206702 - Utility: fix compilation on Linux
Saleem Abdulrasool
compnerd at compnerd.org
Sat Apr 19 14:18:29 PDT 2014
Author: compnerd
Date: Sat Apr 19 16:18:28 2014
New Revision: 206702
URL: http://llvm.org/viewvc/llvm-project?rev=206702&view=rev
Log:
Utility: fix compilation on Linux
When compiling on Linux with GCC 4.8, compilation would fail due to the use of
the offsetof macro. This is a standard macro, defined in stddef.h. Include
this header to ensure that offsetof is declared.
Modified:
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h?rev=206702&r1=206701&r2=206702&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_i386.h Sat Apr 19 16:18:28 2014
@@ -8,6 +8,8 @@
//===---------------------------------------------------------------------===//
#include "llvm/Support/Compiler.h"
+#include <stddef.h>
+
#ifdef DECLARE_REGISTER_INFOS_I386_STRUCT
// Computes the offset of the given GPR in the user data area.
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h?rev=206702&r1=206701&r2=206702&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_mips64.h Sat Apr 19 16:18:28 2014
@@ -7,6 +7,8 @@
//
//===---------------------------------------------------------------------===//
+#include <stddef.h>
+
// Computes the offset of the given GPR in the user data area.
#define GPR_OFFSET(regname) \
(offsetof(GPR, regname))
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h?rev=206702&r1=206701&r2=206702&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_x86_64.h Sat Apr 19 16:18:28 2014
@@ -8,6 +8,8 @@
//===---------------------------------------------------------------------===//
#include "llvm/Support/Compiler.h"
+#include <stddef.h>
+
// Computes the offset of the given GPR in the user data area.
#define GPR_OFFSET(regname) \
(LLVM_EXTENSION offsetof(GPR, regname))
More information about the lldb-commits
mailing list