This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Making syscall information be per-arch, instead of global


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]