From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18227 invoked by alias); 14 Nov 2014 23:17:21 -0000 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 Received: (qmail 18170 invoked by uid 89); 14 Nov 2014 23:17:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 14 Nov 2014 23:17:20 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAENHGYr015017 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Nov 2014 18:17:16 -0500 Received: from localhost (dhcp-10-15-16-169.yyz.redhat.com [10.15.16.169]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sAENHGkO014859 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Fri, 14 Nov 2014 18:17:16 -0500 From: Sergio Durigan Junior To: Pedro Alves Cc: GDB Patches , Gabriel Krisman Bertazi Subject: Re: [PATCH 1/3] Making syscall information be per-arch, instead of global References: <1415837887-28888-1-git-send-email-sergiodj@redhat.com> <1415837887-28888-2-git-send-email-sergiodj@redhat.com> <54662556.1090501@redhat.com> X-URL: http://blog.sergiodj.net Date: Fri, 14 Nov 2014 23:17:00 -0000 In-Reply-To: <54662556.1090501@redhat.com> (Pedro Alves's message of "Fri, 14 Nov 2014 15:52:54 +0000") Message-ID: <87fvdl74p0.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00345.txt.bz2 On Friday, November 14 2014, Pedro Alves wrote: > On 11/13/2014 12:18 AM, Sergio Durigan Junior wrote: > >> (xml_init_syscalls_info): Likewise. > > Should mention the dropped const. > >> xml_init_syscalls_info (const char *filename) >> { >> char *full_file; >> char *dirname; >> - struct syscalls_info *sysinfo; >> + struct syscalls_info *syscalls_info; >> struct cleanup *back_to; >> >> full_file = xml_fetch_content_from_file (filename, gdb_datadir); >> @@ -266,41 +265,47 @@ xml_init_syscalls_info (const char *filename) >> if (dirname != NULL) >> make_cleanup (xfree, dirname); >> >> - sysinfo = syscall_parse_xml (full_file, >> + syscalls_info = syscall_parse_xml (full_file, >> xml_fetch_content_from_file, dirname); > > The line after needs a reindent. > >> do_cleanups (back_to); >> >> - return sysinfo; >> + return syscalls_info; >> } >> > >> - have_initialized_sysinfo = 1; >> + /* If there was some error reading the XML file, we initialize >> + gdbarch->syscalls_info anyway, in order to store information >> + about our attempt. */ >> + if (syscalls_info == NULL) >> + syscalls_info = allocate_syscalls_info (); > > Indentation here looks odd. > >> >> - if (sysinfo == NULL) >> + if (syscalls_info->syscalls == NULL) >> { > > Otherwise looks good. > > Thanks for doing this. Thanks for the review. I fixed all the issues pointed. -- Sergio GPG key ID: 0x65FC5E36 Please send encrypted e-mail if possible http://sergiodj.net/