diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-11-17 09:41:33 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-11-17 09:41:33 +0000 |
commit | 7f82dfc7f0654b735a1dbe5d9d2d2948f175ba64 (patch) | |
tree | 4424d7da6c4432ab27c4c598e6fb142c73f1b76d /gdb/infrun.c | |
parent | 1649019427594c0e78e7082a1885c6ac8a480cb5 (diff) | |
download | gdb-7f82dfc7f0654b735a1dbe5d9d2d2948f175ba64.zip gdb-7f82dfc7f0654b735a1dbe5d9d2d2948f175ba64.tar.gz gdb-7f82dfc7f0654b735a1dbe5d9d2d2948f175ba64.tar.bz2 |
gdb/
Fix wrong debug output with `set debug infrun 1'.
* gdb/infrun.c (handle_inferior_event <debug_infrun>): New variable
old_chain. Temporarily switch INFERIOR_PTID.
* target.h (target_stopped_by_watchpoint): Extend the comment.
(target_stopped_data_address): New comment.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 98e215c..3c17167 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3135,6 +3135,9 @@ targets should add new threads to the thread list themselves in non-stop mode.") { struct regcache *regcache = get_thread_regcache (ecs->ptid); struct gdbarch *gdbarch = get_regcache_arch (regcache); + struct cleanup *old_chain = save_inferior_ptid (); + + inferior_ptid = ecs->ptid; fprintf_unfiltered (gdb_stdlog, "infrun: stop_pc = %s\n", paddress (gdbarch, stop_pc)); @@ -3151,6 +3154,8 @@ targets should add new threads to the thread list themselves in non-stop mode.") fprintf_unfiltered (gdb_stdlog, "infrun: (no data address available)\n"); } + + do_cleanups (old_chain); } if (stepping_past_singlestep_breakpoint) |