From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13394 invoked by alias); 1 Mar 2013 10:31:22 -0000 Received: (qmail 13385 invoked by uid 22791); 1 Mar 2013 10:31:20 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_EG,TW_GJ X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Mar 2013 10:31:09 +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 r21AV9pm006866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Mar 2013 05:31:09 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r21AV89g032269; Fri, 1 Mar 2013 05:31:08 -0500 Message-ID: <5130836B.7090505@redhat.com> Date: Fri, 01 Mar 2013 10:31:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Jiong Wang CC: gdb-patches@sourceware.org Subject: Re: [RFC/TileGX] fix longjmp bug References: <51307BBA.3090202@tilera.com> In-Reply-To: <51307BBA.3090202@tilera.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00008.txt.bz2 Thanks. > gdb/ChangeLog: > > * tilegx-tdep.c (tilegx_get_longjmp_target): New function. > (tilegx_gdbarch_init): Install it. > OK with the issues pointed out below fixed. > +/* This is the implementation of gdbarch method get_longjmp_target. */ > + > +static int > +tilegx_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc) > +{ > + struct gdbarch *gdbarch = get_frame_arch (frame); > + enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); > + CORE_ADDR jb_addr; > + char buf[8]; s/char/gdb_byte/. > + > + jb_addr = get_frame_register_unsigned (frame, TILEGX_R0_REGNUM); > + > + /* TileGX jmp_buf contains 32 elements of type __uint_reg_t which > + is size of 8bytes, the return address is stored in the 25th slot. */ Grammar: /* TileGX's jmp_buf contains 32 elements of type __uint_reg_t which has a size of 8 bytes. The return address is stored in the 25th slot. */ > + if (target_read_memory (jb_addr + 25 * 8, buf, 8)) should be single space ---------------^ OK with these issues fixed. -- Pedro Alves