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: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Cc: Gabriel Krisman Bertazi <gabriel at krisman dot be>
- Date: Fri, 14 Nov 2014 15:52:54 +0000
- 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>
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,
Pedro Alves