Joel Brobecker, le Sun 23 Nov 2014 13:56:29 +0400, a écrit :
> The above does look unusual to me, but if it works and seems to be
> the only correct way, let's go with that.
It is a system interface actually, so we don't really have the choice :)
Samuel
> > > - vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len);
> > > + vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len *
> > > sizeof (*(procinfo_t) 0));
> >
> > Suggest using "sizeof (struct procinfo)", which I think is better
> > than dereferencing a NULL pointer. T
Joel Brobecker, le Sun 23 Nov 2014 11:44:52 +0400, a écrit :
> > - vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len);
> > + vm_deallocate (mach_task_self (), (vm_address_t) pi, pi_len * sizeof
> > (*(procinfo_t) 0));
>
> Suggest using "sizeof (struct procinfo)", which I think
Hello Samuel,
On Sun, Nov 02, 2014 at 04:25:37PM +0100, Samuel Thibault wrote:
> 2014-10-02 Samuel Thibault
>
> * gdb/gnu-nat.c (inf_validate_procinfo): Multiply the number of
> elements pi_len by the size of the elements before calling
> vm_deallocate.
> (inf_validat
2014-10-02 Samuel Thibault
* gdb/gnu-nat.c (inf_validate_procinfo): Multiply the number of
elements pi_len by the size of the elements before calling
vm_deallocate.
(inf_validate_task_sc): Likewise, and properly deallocate the
noise array.
diff --git a/g