aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorDave MacLachlan <dmaclach@google.com>2016-05-12 11:38:09 -0700
committerDave MacLachlan <dmaclach@google.com>2016-05-12 11:38:09 -0700
commit3d225e288c95902b965e0a06333dfdbe25a637b5 (patch)
treecbcd530a8750c170fde142af2c3f90e08f436952 /src/common
parentUpdate to handle dsym files that end with a header. (diff)
downloadbreakpad-3d225e288c95902b965e0a06333dfdbe25a637b5.tar.xz
Fixes up dump_syms build on OS X so it works with ELF.
Adds elf.h header from glibc. Updates dwarf2reader.cc so it isn't comparing a unique_ptr against NULL. Moves from MacOS10.5 SDK to latest SDK for Xcode project. Moves from using gcc to clang for dump_syms tests. Disables warning about 'Missing Field In Structure Initializers' to temporarily work around https://bugs.chromium.org/p/google-breakpad/issues/detail?id=697. With this patch all tests form dump_syms pass again using Xcode 7.3 on Mac OS X 10.11. BUG= https://bugs.chromium.org/p/google-breakpad/issues/detail?id=696, https://bugs.chromium.org/p/google-breakpad/issues/detail?id=697 R=mark@chromium.org Review URL: https://codereview.chromium.org/1970903002 .
Diffstat (limited to 'src/common')
-rw-r--r--src/common/dwarf/dwarf2reader.cc2
-rw-r--r--src/common/mac/Breakpad.xcconfig12
-rw-r--r--src/common/mac/include/features.h16
3 files changed, 21 insertions, 9 deletions
diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc
index dc0e2349..a65b43c8 100644
--- a/src/common/dwarf/dwarf2reader.cc
+++ b/src/common/dwarf/dwarf2reader.cc
@@ -639,7 +639,7 @@ void CompilationUnit::ProcessSplitDwarf() {
}
}
bool found_in_dwp = false;
- if (dwp_reader_ != NULL) {
+ if (dwp_reader_) {
// If we have a .dwp file, read the debug sections for the requested CU.
SectionMap sections;
dwp_reader_->ReadDebugSectionsForCU(dwo_id_, &sections);
diff --git a/src/common/mac/Breakpad.xcconfig b/src/common/mac/Breakpad.xcconfig
index 672be2ce..f0913690 100644
--- a/src/common/mac/Breakpad.xcconfig
+++ b/src/common/mac/Breakpad.xcconfig
@@ -27,12 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-ARCHS = $(ARCHS_STANDARD_32_64_BIT)
-SDKROOT = macosx10.5
-
-GCC_VERSION = 4.2
-GCC_VERSION[sdk=macosx10.4][arch=*] = 4.0
-
GCC_C_LANGUAGE_STANDARD = c99
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
@@ -41,7 +35,10 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = NO
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_MISSING_PARENTHESES = YES
-GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
+
+// Once https://bugs.chromium.org/p/google-breakpad/issues/detail?id=697
+// is fixed this should be reenabled.
+//GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
GCC_WARN_SIGN_COMPARE = YES
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES
@@ -51,6 +48,5 @@ GCC_WARN_UNUSED_VARIABLE = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
-DEBUG_INFORMATION_FORMAT[sdk=macosx10.4][arch=*] = stabs
ALWAYS_SEARCH_USER_PATHS = NO
diff --git a/src/common/mac/include/features.h b/src/common/mac/include/features.h
new file mode 100644
index 00000000..2020c482
--- /dev/null
+++ b/src/common/mac/include/features.h
@@ -0,0 +1,16 @@
+// This file is included by third_party/glibc/elf/elf.h
+// We use it to map a couple of glibc specific macros
+// over to their OS X equivalents.
+
+
+// Map GNU endianness macros over to OS X endianness macros.
+
+#ifndef __LITTLE_ENDIAN
+ #define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
+#endif
+#ifndef __BIG_ENDIAN
+ #define __BIG_ENDIAN __ORDER_BIG_ENDIAN__
+#endif
+#ifndef __BYTE_ORDER
+ #define __BYTE_ORDER __BYTE_ORDER__
+#endif