From patchwork Fri May 16 15:26:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 968 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id B7DAC36007A for ; Fri, 16 May 2014 08:43:41 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14314964) id 5CA561985ABC; Fri, 16 May 2014 08:43:41 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 21510162970B for ; Fri, 16 May 2014 08:43:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=xeJFVpa10RtnbFRcwj8zEZZpWKeW1Nv bBGNV3g+QHqenfRFOH1rLP/g07CElpgkRnSxV013puMFqy+LeoMsXsnQNzhPJYgI jDnHmOJvtT8JLWMeNlDMAt6IJhQWncSrqRXI20NFPaLvOUwXuRwTVuNXqQyX8+XA E2ZWcl3QgTTo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=a91c5S358gfQKmTys4u2JAGe19k=; b=HmUh5 csc1q+FfGLsoyJIJGLxeZzejPDtmRfYIR+Wu/xgCCLJmWvda2oCmAJ0o+eG+8d2J 2/XiSFuC0FH2EJsfDWpK1O3O1v1rdBTak4ZI4RjWpvMFyAwsKItmxMddpMHzcZwp yopmTvAOG7xxUozFUUoK7z8s+RjhLXVCSog3PY= Received: (qmail 24047 invoked by alias); 16 May 2014 15:43:39 -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 23999 invoked by uid 89); 16 May 2014 15:43:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 May 2014 15:43:38 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4GFQkFO003805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 16 May 2014 11:26:47 -0400 Received: from barimba.redhat.com (ovpn-113-182.phx2.redhat.com [10.3.113.182]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4GFQcVF006849; Fri, 16 May 2014 11:26:46 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Jan Kratochvil Subject: [PATCH 13/14] add s390_gcc_target_options Date: Fri, 16 May 2014 09:26:34 -0600 Message-Id: <1400253995-12333-14-git-send-email-tromey@redhat.com> In-Reply-To: <1400253995-12333-1-git-send-email-tromey@redhat.com> References: <1400253995-12333-1-git-send-email-tromey@redhat.com> X-DH-Original-To: gdb@patchwork.siddhesh.in From: Jan Kratochvil This adds s390_gcc_target_options, an implementation of the new "gcc_target_options" gdbarch method. This was needed because the default implementation of the method doesn't work properly for S390, as this architecture needs "-m31" rather than "-m32". 2014-05-16 Jan Kratochvil * s390-linux-tdep.c (s390_gcc_target_options): New function. (s390_gdbarch_init): Add it to gdbarch. --- gdb/ChangeLog | 5 +++++ gdb/s390-linux-tdep.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c index 9ab5c70..9653797 100644 --- a/gdb/s390-linux-tdep.c +++ b/gdb/s390-linux-tdep.c @@ -3042,6 +3042,14 @@ s390_address_class_name_to_type_flags (struct gdbarch *gdbarch, return 0; } +/* Implement gdbarch_gcc_target_options. GCC does not know "-m32". */ + +static char * +s390_gcc_target_options (struct gdbarch *gdbarch) +{ + return xstrdup ("-m31"); +} + /* Implementation of `gdbarch_stap_is_single_operand', as defined in gdbarch.h. */ @@ -3338,6 +3346,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->sizeof_fpregset = s390_sizeof_fpregset; set_gdbarch_addr_bits_remove (gdbarch, s390_addr_bits_remove); + set_gdbarch_gcc_target_options (gdbarch, s390_gcc_target_options); set_solib_svr4_fetch_link_map_offsets (gdbarch, svr4_ilp32_fetch_link_map_offsets);