[Lldb-commits] [lldb] r184738 - Using offsetof to an item within an array is an extension so mark it as such to avoid compiler warnings.
Andy Gibbs
andyg1001 at hotmail.co.uk
Mon Jun 24 07:05:59 PDT 2013
Author: andyg
Date: Mon Jun 24 09:05:59 2013
New Revision: 184738
URL: http://llvm.org/viewvc/llvm-project?rev=184738&view=rev
Log:
Using offsetof to an item within an array is an extension so mark it as such to avoid compiler warnings.
Modified:
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp
Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp?rev=184738&r1=184737&r2=184738&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextLinux_x86_64.cpp Mon Jun 24 09:05:59 2013
@@ -7,6 +7,7 @@
//
//===---------------------------------------------------------------------===//
+#include "llvm/Support/Compiler.h"
#include "RegisterContextLinux_x86_64.h"
#include <vector>
@@ -29,7 +30,7 @@ do {
} while(false);
#define DR_OFFSET(reg_index) \
- (offsetof(UserArea, u_debugreg[reg_index]))
+ (LLVM_EXTENSION offsetof(UserArea, u_debugreg[reg_index]))
#define UPDATE_DR_INFO(reg_index) \
do { \
Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp?rev=184738&r1=184737&r2=184738&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp Mon Jun 24 09:05:59 2013
@@ -10,6 +10,7 @@
#include "lldb/Core/DataExtractor.h"
#include "lldb/Target/Thread.h"
#include "lldb/Host/Endian.h"
+#include "llvm/Support/Compiler.h"
#include "ProcessPOSIX.h"
#include "ProcessPOSIXLog.h"
@@ -175,14 +176,14 @@ g_reg_sets[k_num_register_sets] =
eFormatHex, { kind1, kind2, kind3, kind4, fpu_##reg }, NULL, NULL }
#define DEFINE_FP(reg, i) \
- { #reg#i, NULL, FP_SIZE, FPR_OFFSET(reg[i]), eEncodingVector, \
- eFormatVectorOfUInt8, \
+ { #reg#i, NULL, FP_SIZE, LLVM_EXTENSION FPR_OFFSET(reg[i]), \
+ eEncodingVector, eFormatVectorOfUInt8, \
{ dwarf_##reg##i, dwarf_##reg##i, \
LLDB_INVALID_REGNUM, gdb_##reg##i, fpu_##reg##i }, NULL, NULL }
#define DEFINE_XMM(reg, i) \
- { #reg#i, NULL, XMM_SIZE, FPR_OFFSET(reg[i]), eEncodingVector, \
- eFormatVectorOfUInt8, \
+ { #reg#i, NULL, XMM_SIZE, LLVM_EXTENSION FPR_OFFSET(reg[i]), \
+ eEncodingVector, eFormatVectorOfUInt8, \
{ dwarf_##reg##i, dwarf_##reg##i, \
LLDB_INVALID_REGNUM, gdb_##reg##i, fpu_##reg##i }, NULL, NULL }
Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp?rev=184738&r1=184737&r2=184738&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp Mon Jun 24 09:05:59 2013
@@ -18,6 +18,7 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Host/Endian.h"
+#include "llvm/Support/Compiler.h"
#include "ProcessPOSIX.h"
#include "ProcessMonitor.h"
@@ -326,20 +327,20 @@ static uint32_t value_regs = LLDB_INVALI
eFormatHex, { kind1, kind2, kind3, kind4, fpu_##reg }, NULL, NULL }
#define DEFINE_FP(reg, i) \
- { #reg#i, NULL, FP_SIZE, FPR_OFFSET(reg[i]), eEncodingVector, \
- eFormatVectorOfUInt8, \
+ { #reg#i, NULL, FP_SIZE, LLVM_EXTENSION FPR_OFFSET(reg[i]), \
+ eEncodingVector, eFormatVectorOfUInt8, \
{ gcc_dwarf_fpu_##reg##i, gcc_dwarf_fpu_##reg##i, \
LLDB_INVALID_REGNUM, gdb_fpu_##reg##i, fpu_##reg##i }, NULL, NULL }
#define DEFINE_XMM(reg, i) \
- { #reg#i, NULL, XMM_SIZE, FPR_OFFSET(reg[i]), eEncodingVector, \
- eFormatVectorOfUInt8, \
+ { #reg#i, NULL, XMM_SIZE, LLVM_EXTENSION FPR_OFFSET(reg[i]), \
+ eEncodingVector, eFormatVectorOfUInt8, \
{ gcc_dwarf_fpu_##reg##i, gcc_dwarf_fpu_##reg##i, \
LLDB_INVALID_REGNUM, gdb_fpu_##reg##i, fpu_##reg##i }, NULL, NULL }
#define DEFINE_YMM(reg, i) \
- { #reg#i, NULL, YMM_SIZE, YMM_OFFSET(reg[i]), eEncodingVector, \
- eFormatVectorOfUInt8, \
+ { #reg#i, NULL, YMM_SIZE, LLVM_EXTENSION YMM_OFFSET(reg[i]), \
+ eEncodingVector, eFormatVectorOfUInt8, \
{ gcc_dwarf_fpu_##reg##i, gcc_dwarf_fpu_##reg##i, \
LLDB_INVALID_REGNUM, gdb_fpu_##reg##i, fpu_##reg##i }, NULL, NULL }
More information about the lldb-commits
mailing list