From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10914 invoked by alias); 19 Feb 2003 17:01:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10907 invoked from network); 19 Feb 2003 17:01:17 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 19 Feb 2003 17:01:17 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E420D2E96; Wed, 19 Feb 2003 12:06:02 -0500 (EST) Message-ID: <3E53B97A.4090809@redhat.com> Date: Wed, 19 Feb 2003 17:01:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.0.2) Gecko/20030217 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: Re-initializing a list after the control returns to gdb... References: <20030219020101.GI2105@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00413.txt.bz2 > I did it by inserting a call to ada_reset_tasks_list() inside > normal_stop(), like so: > > *************** print_stop_reason (enum inferior_stop_re > *** 3360,3365 **** > --- 3362,3369 ---- > void > normal_stop (void) > { > + ada_reset_tasks_list (NULL); > + > /* As with the notification of thread events, we want to delay > notifying the user that we've switched thread context until > the inferior actually stops. > > My testing shows that it seems to be working pretty well. But do you > think that this is a good idea? And does this change have any chance of > being accepted for inclusion (eventually, we are still ironing out some > wrinkles here and there to make our changes more acceptable, but hope to > be able to contribute our ada-language support changes soon)? You've the `observer' problem. GDB's observer code is very primative. A combination of gdb-events (needs direction) and chained hooks (see target_new_objfile_hook). I suspect what you really want is a `target changed' event. Andrew