From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13657 invoked by alias); 6 Jul 2012 09:50:05 -0000 Received: (qmail 13642 invoked by uid 22791); 6 Jul 2012 09:50:04 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Jul 2012 09:49:44 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 06 Jul 2012 02:49:43 -0700 X-ExtLoop1: 1 Received: from swsutil001.isw.intel.com ([10.237.237.11]) by orsmga002.jf.intel.com with ESMTP; 06 Jul 2012 02:49:42 -0700 Received: from ulslx001.iul.intel.com (ulslx001.iul.intel.com [172.28.207.63]) by swsutil001.isw.intel.com (8.13.6/8.13.6/MailSET/Hub) with ESMTP id q669neLx032154; Fri, 6 Jul 2012 10:49:41 +0100 Received: from ulslx001.iul.intel.com (localhost [127.0.0.1]) by ulslx001.iul.intel.com with ESMTP id q669neNd027464; Fri, 6 Jul 2012 11:49:40 +0200 Received: (from mmetzger@localhost) by ulslx001.iul.intel.com with id q669ndTv027459; Fri, 6 Jul 2012 11:49:39 +0200 From: markus.t.metzger@intel.com To: gdb-patches@sourceware.org Cc: markus.t.metzger@gmail.com, Markus Metzger Subject: [PATCH 1/1] gdb, python: update threads in Inferior.threads () Date: Fri, 06 Jul 2012 09:50:00 -0000 Message-Id: <1341568171-27211-1-git-send-email-markus.t.metzger@intel.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00084.txt.bz2 From: Markus Metzger When querying an inferior's threads in Python in a remote debugging configuration, only the already known threads are returned. Update the thread list in infpy_threads () before creating the Python objects. Not sure this is the right place. We should probably update the thread list as soon as we learn that the target stopped. 2012-07-06 Markus Metzger gdb/python/ * py-inferior.c (infpy_threads): Call update_thread_list (). --- gdb/python/py-inferior.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index 2b229be..ef28c33 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -303,6 +303,8 @@ infpy_threads (PyObject *self, PyObject *args) INFPY_REQUIRE_VALID (inf_obj); + update_thread_list (); + tuple = PyTuple_New (inf_obj->nthreads); if (!tuple) return NULL; -- 1.7.1