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/2] Fix watchpoints across fork #2


On 01/20/2012 09:30 PM, Jan Kratochvil wrote:
> +/* Per-inferior data.  */
> +struct i386_inferior_data
> +  {
> +    /* Copy of i386 hardware debug registers for performance reasons.  */
> +    struct i386_debug_reg_state state;
> +  };

Indenting of {}'s should be on column 0.


> +	  memcpy (&detached_inf_data_local, inf_data,
> +		  sizeof (detached_inf_data_local));

Small nit, but

 detached_inf_data_local = *inf_data;

should work just as well, no need for memcpy, afaics.


> +   variable.  Hit-comments need to be duplicite there to catch both at-stops

"duplicated", I think.


> +    set pf_prefix $prefix_mt
> +    lappend pf_prefix "singlethreaded:"
> +
> +    set executable ${testfile}-${type}-st
> +    set srcfile_main ${srcdir}/${subdir}/${testfile}-st.c
> +    if { [gdb_compile "${srcfile_main} ${srcfile_type}" ${objdir}/${subdir}/${executable} executable [list debug additional_flags=-D$symbol]] != "" } {
> +	untested ${testfile}.exp

pf_prefix should be restored on all returns.  Several instances of this issue.

> +	return
> +    }


Otherwise looks good to me.  Thanks.

-- 
Pedro Alves


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