This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Making syscall information be per-arch, instead of global
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Gabriel Krisman Bertazi <gabriel at krisman dot be>
- Date: Fri, 14 Nov 2014 18:17:15 -0500
- Subject: Re: [PATCH 1/3] Making syscall information be per-arch, instead of global
- Authentication-results: sourceware.org; auth=none
- References: <1415837887-28888-1-git-send-email-sergiodj at redhat dot com> <1415837887-28888-2-git-send-email-sergiodj at redhat dot com> <54662556 dot 1090501 at redhat dot com>
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/