[RFC,08/15] gdbserver: Move pointer dereference to after assert checks.
Commit Message
From: Henrik Wallin <henrik.wallin@windriver.com>
gdb/gdbserver/ChangeLog:
* linux-arm-low.c (arm_new_thread): Move pointer dereference
to after assert checks.
Signed-off-by: Henrik Wallin <henrik.wallin@windriver.com>
---
gdb/gdbserver/linux-arm-low.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Comments
On 10/14/2015 12:14 PM, henrik.wallin@windriver.com wrote:
> From: Henrik Wallin <henrik.wallin@windriver.com>
>
> gdb/gdbserver/ChangeLog:
>
> * linux-arm-low.c (arm_new_thread): Move pointer dereference
> to after assert checks.
OK.
Thanks,
Pedro Alves
2015-10-15 19:29 GMT+02:00 Pedro Alves <palves@redhat.com>:
> On 10/14/2015 12:14 PM, henrik.wallin@windriver.com wrote:
>> From: Henrik Wallin <henrik.wallin@windriver.com>
>>
>> gdb/gdbserver/ChangeLog:
>>
>> * linux-arm-low.c (arm_new_thread): Move pointer dereference
>> to after assert checks.
>
> OK.
Next step is?
I guess someone with push permissions need to pick this one up?
thanks,
/ Henrik
On 10/29/2015 01:50 PM, Wallin, Henrik wrote:
>
>
> 2015-10-15 19:29 GMT+02:00 Pedro Alves <palves@redhat.com>:
>> On 10/14/2015 12:14 PM, henrik.wallin@windriver.com wrote:
>>> From: Henrik Wallin <henrik.wallin@windriver.com>
>>>
>>> gdb/gdbserver/ChangeLog:
>>>
>>> * linux-arm-low.c (arm_new_thread): Move pointer dereference
>>> to after assert checks.
>>
>> OK.
>
> Next step is?
> I guess someone with push permissions need to pick this one up?
>
I can push it for you. (Most likely next week)
Regards,
Antoine
On 10/29/2015 01:53 PM, Antoine Tremblay wrote:
>
>
> On 10/29/2015 01:50 PM, Wallin, Henrik wrote:
>>
>>
>> 2015-10-15 19:29 GMT+02:00 Pedro Alves <palves@redhat.com>:
>>> On 10/14/2015 12:14 PM, henrik.wallin@windriver.com wrote:
>>>> From: Henrik Wallin <henrik.wallin@windriver.com>
>>>>
>>>> gdb/gdbserver/ChangeLog:
>>>>
>>>> * linux-arm-low.c (arm_new_thread): Move pointer dereference
>>>> to after assert checks.
>>>
>>> OK.
>>
>> Next step is?
>> I guess someone with push permissions need to pick this one up?
>>
>
> I can push it for you. (Most likely next week)
>
Pushed. I had the time now after all.
@@ -686,8 +686,8 @@ arm_new_thread (struct lwp_info *lwp)
static void
arm_new_fork (struct process_info *parent, struct process_info *child)
{
- struct arch_process_info *parent_proc_info = parent->priv->arch_private;
- struct arch_process_info *child_proc_info = child->priv->arch_private;
+ struct arch_process_info *parent_proc_info;
+ struct arch_process_info *child_proc_info;
struct lwp_info *child_lwp;
struct arch_lwp_info *child_lwp_info;
int i;
@@ -698,6 +698,9 @@ arm_new_fork (struct process_info *parent, struct process_info *child)
gdb_assert (child->priv != NULL
&& child->priv->arch_private != NULL);
+ parent_proc_info = parent->priv->arch_private;
+ child_proc_info = child->priv->arch_private;
+
/* Linux kernel before 2.6.33 commit
72f674d203cd230426437cdcf7dd6f681dad8b0d
will inherit hardware debug registers from parent