diff options
author | Yao Qi <yao@codesourcery.com> | 2011-06-23 15:08:01 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2011-06-23 15:08:01 +0000 |
commit | 6e586cc56592f85535f788391b4f48025311b465 (patch) | |
tree | 4c2095a48562733d810a5d8ee321166b9796c33b /gdb/remote.c | |
parent | ab5c6a729c416841aeda2398f77d881aef09208f (diff) | |
download | gdb-6e586cc56592f85535f788391b4f48025311b465.zip gdb-6e586cc56592f85535f788391b4f48025311b465.tar.gz gdb-6e586cc56592f85535f788391b4f48025311b465.tar.bz2 |
2011-06-23 Yao Qi <yao@codesourcery.com>
* infrun.c (start_remote): Move call init_wait_for_inferior to ...
* remote.c (remote_start_remote): ... here.
* monitor.c (monitor_open): ... here.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 8cdf79e..19cc0b6 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -3280,6 +3280,17 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p) /* Always add the main thread. */ add_thread_silent (inferior_ptid); + /* init_wait_for_inferior should be called before get_offsets in order + to manage `inserted' flag in bp loc in a correct state. + breakpoint_init_inferior, called from init_wait_for_inferior, set + `inserted' flag to 0, while before breakpoint_re_set, called from + start_remote, set `inserted' flag to 1. In the initialization of + inferior, breakpoint_init_inferior should be called first, and then + breakpoint_re_set can be called. If this order is broken, state of + `inserted' flag is wrong, and cause some problems on breakpoint + manipulation. */ + init_wait_for_inferior (); + get_offsets (); /* Get text, data & bss offsets. */ /* If we could not find a description using qXfer, and we know |