From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7293 invoked by alias); 14 Feb 2012 08:19:30 -0000 Received: (qmail 7279 invoked by uid 22791); 14 Feb 2012 08:19:27 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Feb 2012 08:19:11 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id EE58829004F; Tue, 14 Feb 2012 09:19:10 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x+jVwmFZlvLm; Tue, 14 Feb 2012 09:19:10 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id DC51129004B; Tue, 14 Feb 2012 09:19:10 +0100 (CET) Subject: Re: RFA: [Ada] extract known tasks array parameters from symbol table Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <20120213161529.GE3474@adacore.com> Date: Tue, 14 Feb 2012 08:19:00 -0000 Cc: "gdb-patches@sourceware.org ml" Content-Transfer-Encoding: quoted-printable Message-Id: References: <7A06C670-A574-4AE4-A89C-2532671E5F64@adacore.com> <20120213161529.GE3474@adacore.com> To: Joel Brobecker 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-02/txt/msg00252.txt.bz2 On Feb 13, 2012, at 5:15 PM, Joel Brobecker wrote: > Hi Tristan, >=20 >> Maybe we should get rid of the fallback, as without debug symbol for >> Ada.Tasking, the whole ada-tasks.c code is pretty useless. >=20 > The problem is that certain GNU/Linux distributions decided to simply > strip all runtime libraries of debug info, and then provide additional > packages for the debug version of these shared libs. And apparently, > it's a significant disruption to address this issue at the package > creation level. So we need to try to support those users the best > we can. Ok. But how are debug infos for the ATCB read ? Are they in the executabl= e due to implicit with of ada.tasking ? >> Manually tested on ia64-hp-openvms. >=20 > I'd really like it to be tested on at least a GNU/Linux variant as > well as a bareboard variant using the ravenscar runtime (try the list). > Or, alternatively, put the patch in our tree, and then wait a day or > two to get the results of the nightly testing. Ok, will do. >> gdb/ >> 2012-02-13 Tristan Gingold >>=20 >> * ada-tasks.c (struct ada_tasks_inferior_data): Add >> known_tasks_element and known_tasks_length fields. >> (read_known_tasks_array): Change argument type. Use pointer type >> and number of elements from DATA. Adjust. >> (read_known_tasks_list): Likewise. >> (get_known_tasks_addr): Change profile. Try symtab first, and >> extract type and size from it. >> (ada_set_current_inferior_known_tasks_addr): Adjust for above >> change. >=20 > Mostly OK. >=20 > Just a few thoughts on your patch. >=20 >> -/* Return the address of the variable NAME that contains all the known >> - tasks maintained in the Ada Runtime. Return NULL if the variable >> - could not be found, meaning that the inferior program probably does >> - not use tasking. */ >> +/* Try method KIND to extract known tasks info for DATA. >> + Return non-zero in case of success, and set the known tasks field of= DATA. >> +*/ >=20 > Nit-picking: Can you fold the last line at around 70 chars? Sure. >=20 >> -static CORE_ADDR >> -get_known_tasks_addr (const char *name) >> +static int >> +get_known_tasks_addr (struct ada_tasks_inferior_data *data, >> + enum ada_known_tasks_kind kind) >=20 > For this function, I would like it to be renamed to "get_ada_tasks_info", > "get_inferior_tasks_info", or maybe even "ada_task_info_sniffer". > Something like that. >=20 > Also, I am thinking that there is no reason that the caller should > be testing each kind one after the other. I think something like: >=20 > static struct ada_tasks_inferior_data * > ada_task_info_sniffer (void) > { > [lookup array symbol] > if (symbol) > { > [validate] > return array_info; > } >=20 > [lookup list symbol] > if (symbol) > { > [validate] > return list_info; > } > [...] >=20 > WDYT? Will submit a new version. Tristan.