public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Andrew Sutherland <sombrero@alum.mit.edu>, archer@sourceware.org
Subject: ping: Re: [python] [patch] Fix crash on remote targets  [Re: [python] python-inferior add_inferior_object tries to access thread info before it exists with remote target (VMware remote stub)]
Date: Tue, 13 Oct 2009 18:07:00 -0000	[thread overview]
Message-ID: <20091013180706.GA14075@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <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)

  reply	other threads:[~2009-10-13 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09  3:35 [python] python-inferior add_inferior_object tries to access thread info before it exists with remote target (VMware remote stub) Andrew Sutherland
2009-09-09  8:27 ` Jan Kratochvil
2009-09-17 20:10 ` [python] [patch] Fix crash on remote targets [Re: [python] python-inferior add_inferior_object tries to access thread info before it exists with remote target (VMware remote stub)] Jan Kratochvil
2009-10-13 18:07   ` Jan Kratochvil [this message]
2009-10-13 20:40     ` ping: " Tom Tromey
2009-10-13 20:58       ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091013180706.GA14075@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=archer@sourceware.org \
    --cc=sombrero@alum.mit.edu \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).