diff options
author | Henrik Wallin <henrik.wallin@windriver.com> | 2015-10-14 13:14:26 +0200 |
---|---|---|
committer | Antoine Tremblay <antoine.tremblay@ericsson.com> | 2015-10-29 14:28:48 -0400 |
commit | 692916105d13be0ca5588bf8aa94b8ba04239269 (patch) | |
tree | 18b0d7ea79eec34e5831eed1cb64773c7d2545ad | |
parent | b42945fd28b881e23016ce2efaf5fd83d5038f34 (diff) | |
download | gdb-692916105d13be0ca5588bf8aa94b8ba04239269.zip gdb-692916105d13be0ca5588bf8aa94b8ba04239269.tar.gz gdb-692916105d13be0ca5588bf8aa94b8ba04239269.tar.bz2 |
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>
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/linux-arm-low.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 70d832f..52d6b50 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2015-10-29 Henrik Wallin <henrik.wallin@windriver.com> + + * linux-arm-low.c (arm_new_thread): Move pointer dereference + to after assert checks. + 2015-10-29 Simon Marchi <simon.marchi@ericsson.com> * proc-service.c (ps_pdread): Add/adjust casts. diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c index bab2aaf..e10955f 100644 --- a/gdb/gdbserver/linux-arm-low.c +++ b/gdb/gdbserver/linux-arm-low.c @@ -706,8 +706,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; @@ -718,6 +718,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 |