GNU Binutils with patches for OS216
Revision | 692916105d13be0ca5588bf8aa94b8ba04239269 (tree) |
---|---|
Time | 2015-10-30 03:28:48 |
Author | Henrik Wallin <henrik.wallin@wind...> |
Commiter | Antoine Tremblay |
gdbserver: Move pointer dereference to after assert checks.
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>
@@ -1,3 +1,8 @@ | ||
1 | +2015-10-29 Henrik Wallin <henrik.wallin@windriver.com> | |
2 | + | |
3 | + * linux-arm-low.c (arm_new_thread): Move pointer dereference | |
4 | + to after assert checks. | |
5 | + | |
1 | 6 | 2015-10-29 Simon Marchi <simon.marchi@ericsson.com> |
2 | 7 | |
3 | 8 | * proc-service.c (ps_pdread): Add/adjust casts. |
@@ -706,8 +706,8 @@ arm_new_thread (struct lwp_info *lwp) | ||
706 | 706 | static void |
707 | 707 | arm_new_fork (struct process_info *parent, struct process_info *child) |
708 | 708 | { |
709 | - struct arch_process_info *parent_proc_info = parent->priv->arch_private; | |
710 | - struct arch_process_info *child_proc_info = child->priv->arch_private; | |
709 | + struct arch_process_info *parent_proc_info; | |
710 | + struct arch_process_info *child_proc_info; | |
711 | 711 | struct lwp_info *child_lwp; |
712 | 712 | struct arch_lwp_info *child_lwp_info; |
713 | 713 | int i; |
@@ -718,6 +718,9 @@ arm_new_fork (struct process_info *parent, struct process_info *child) | ||
718 | 718 | gdb_assert (child->priv != NULL |
719 | 719 | && child->priv->arch_private != NULL); |
720 | 720 | |
721 | + parent_proc_info = parent->priv->arch_private; | |
722 | + child_proc_info = child->priv->arch_private; | |
723 | + | |
721 | 724 | /* Linux kernel before 2.6.33 commit |
722 | 725 | 72f674d203cd230426437cdcf7dd6f681dad8b0d |
723 | 726 | will inherit hardware debug registers from parent |