[PATCH] [native x86 GNU/Linux] Access debug register mirror from the corresponding inferior.

Pedro Alves palves@redhat.com
Wed Feb 13 15:04:00 GMT 2013


On 02/12/2013 04:50 PM, Jan Kratochvil wrote:
> On Tue, 12 Feb 2013 13:35:59 +0100, Pedro Alves wrote:
>> On 02/11/2013 09:09 PM, Pedro Alves wrote:
>>> In a nutshell, we decouple the watchpoints code from inferiors, making
>>> it track target processes instead.
> 
> It looks really cleaner than waht it was.
> 
> I haven't found there any real bug.

Great.

> style: Here and on many other places should be pid_t.

Fixed.

>> -/* Per-inferior hook for register_inferior_data_with_cleanup.  */
>> +struct i386_process_info *i386_process_list = NULL;
> 
> Missing static.

Fixed.

>> +static struct i386_process_info *
>> +i386_find_process_pid (int pid)
>>  {
>> -  struct i386_inferior_data *inf_data = arg;
>> +  struct i386_process_info *inf;
> 
> style: The 'inf' name is confusing when it is not inferior.
> 

Fixed.

>> +/* The method to call, if any, when a new fork is attached.  */
>> +static void (*linux_nat_new_fork) (struct lwp_info *, int);
> 
> style: The parameters could be named.

Fixed.

>> +/* Register a method to call whenever a process is killed or
>> +   detached.  */
>> +void linux_nat_set_forget_process (struct target_ops *, void (*) (int));
> 
> style: Parameters could be named, I do not understand why to omit their names.

When in Rome...  I've now added a typedef for the hook type, so the
param names are written only once.

Here's what I applied now.

Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_regs_state.diff
Type: text/x-patch
Size: 37268 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20130213/de34f1ae/attachment.bin>


More information about the Gdb-patches mailing list