This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
ping: Re: [python] [patch] Fix crash on remote targets [Re:[python] python-inferior add_inferior_object tries to access thread infobefore it exists with remote target (VMware remote stub)]
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Andrew Sutherland <sombrero at alum dot mit dot edu>, archer at sourceware dot org
- Date: Tue, 13 Oct 2009 20:07:06 +0200
- Subject: ping: Re: [python] [patch] Fix crash on remote targets [Re:[python] python-inferior add_inferior_object tries to access thread infobefore it exists with remote target (VMware remote stub)]
- References: <h877o1$56n$1@ger.gmane.org><20090917201005.GA18401@host0.dyn.jankratochvil.net>
Hi Tom,
ping, this bug costs daily many watthours of testbox. :-)
Thanks,
Jan
------------------------------------------------------------------------------
Hi,
tried first to get working get_current_arch at the add_inferior_object time
but found it is probably right it does not work at that time.
gdb.server/server-run.exp currently crashes with:
thread.c:581: internal-error: is_thread_state: Assertion `tp' failed.
No regressions on {x86_64,x86_64-m32,i686}-fedora11-linux-gnu.
Thanks,
Jan
2009-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* python/py-inferior.c (add_inferior_object): Call ensure_python_env
just with target_gdbarch, new comment.
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -104,7 +104,10 @@ add_inferior_object (int pid)
return;
}
- cleanup = ensure_python_env (get_current_arch (), current_language);
+ /* While creating new inferior no inferior thread is available. Therefore
+ get_current_arch has no valid current frame (and it would crash). */
+
+ cleanup = ensure_python_env (target_gdbarch, current_language);
inf_obj = PyObject_New (inferior_object, &inferior_object_type);
if (!inf_obj)