From patchwork Fri Oct 7 12:37:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Kolesov X-Patchwork-Id: 16340 Received: (qmail 129413 invoked by alias); 7 Oct 2016 12:38:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 129389 invoked by uid 89); 7 Oct 2016 12:38:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=target-specific, targetspecific, Hx-languages-length:1283 X-HELO: smtprelay.synopsys.com Received: from smtprelay.synopsys.com (HELO smtprelay.synopsys.com) (198.182.47.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Oct 2016 12:38:06 +0000 Received: from dc8secmta2.synopsys.com (dc8secmta2.synopsys.com [10.13.218.202]) by smtprelay.synopsys.com (Postfix) with ESMTP id 70BF124E204E for ; Fri, 7 Oct 2016 05:38:05 -0700 (PDT) Received: from dc8secmta2.internal.synopsys.com (dc8secmta2.internal.synopsys.com [127.0.0.1]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id 6402CA4112 for ; Fri, 7 Oct 2016 05:38:05 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id 4632FA4102 for ; Fri, 7 Oct 2016 05:38:05 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 31109278; Fri, 7 Oct 2016 05:38:05 -0700 (PDT) Received: from akolesov-lab.internal.synopsys.com (akolesov-lab.internal.synopsys.com [10.121.8.134]) by mailhost.synopsys.com (Postfix) with ESMTP id 24E68273; Fri, 7 Oct 2016 05:38:03 -0700 (PDT) From: Anton Kolesov To: gdb-patches@sourceware.org Cc: Anton Kolesov , Francois Bedard Subject: [PATCH 1/3] arc: Add a gdbarch_tdep structure Date: Fri, 7 Oct 2016 15:37:48 +0300 Message-Id: <1475843870-11449-1-git-send-email-Anton.Kolesov@synopsys.com> Add target-specific structure gdbarch_tdep for ARC. gdb/ChangeLog: * arc-tdep.h: Define gdbarch_tdep. * arc-tdep.c (arc_gdbarch_init): Allocate gdbarch_tdep. --- gdb/arc-tdep.c | 5 ++++- gdb/arc-tdep.h | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c index 60a4e04..58de8e9 100644 --- a/gdb/arc-tdep.c +++ b/gdb/arc-tdep.c @@ -1159,7 +1159,10 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) if (!arc_tdesc_init (info, &tdesc, &tdesc_data)) return NULL; - struct gdbarch *gdbarch = gdbarch_alloc (&info, NULL); + /* Allocate the ARC-private target-dependent information structure, and the + GDB target-independent information structure. */ + struct gdbarch_tdep *tdep = XCNEW (struct gdbarch_tdep); + struct gdbarch *gdbarch = gdbarch_alloc (&info, tdep); /* Data types. */ set_gdbarch_short_bit (gdbarch, 16); diff --git a/gdb/arc-tdep.h b/gdb/arc-tdep.h index 1b2694b..ea34b9e 100644 --- a/gdb/arc-tdep.h +++ b/gdb/arc-tdep.h @@ -77,6 +77,12 @@ enum arc_regnum extern int arc_debug; +/* Target-dependent information. */ + +struct gdbarch_tdep +{ +}; + /* Utility functions used by other ARC-specific modules. */ static inline int