runtime: expose the layout of SwiftError to LLDB through global constants

This commit is contained in:
Dmitri Gribenko
2016-08-10 15:41:39 -06:00
parent 398f483557
commit 990350e068
4 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#include "ErrorObject.h"
using namespace swift;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
const size_t swift::_swift_lldb_offsetof_SwiftError_typeMetadata =
offsetof(SwiftError, type);
#pragma clang diagnostic pop
const size_t swift::_swift_lldb_sizeof_SwiftError = sizeof(SwiftError);