Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: RFA: [Ada] extract known tasks array parameters from symbol table
Date: Tue, 14 Feb 2012 08:19:00 -0000	[thread overview]
Message-ID: <D9871EBC-F8D5-4945-88A5-976CB8122074@adacore.com> (raw)
In-Reply-To: <20120213161529.GE3474@adacore.com>


On Feb 13, 2012, at 5:15 PM, Joel Brobecker wrote:

> Hi Tristan,
> 
>> Maybe we should get rid of the fallback, as without debug symbol for
>> Ada.Tasking, the whole ada-tasks.c code is pretty useless.
> 
> 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 executable due to implicit with of ada.tasking ?

>> Manually tested on ia64-hp-openvms.
> 
> 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  <gingold@adacore.com>
>> 
>> 	* 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.
> 
> Mostly OK.
> 
> Just a few thoughts on your patch.
> 
>> -/* 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.
>> +*/
> 
> Nit-picking: Can you fold the last line at around 70 chars?

Sure.

> 
>> -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)
> 
> 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.
> 
> 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:
> 
>    static struct ada_tasks_inferior_data *
>    ada_task_info_sniffer (void)
>    {
>       [lookup array symbol]
>       if (symbol)
>         {
>           [validate]
>           return array_info;
>         }
> 
>       [lookup list symbol]
>       if (symbol)
>         {
>           [validate]
>           return list_info;
>         }
>      [...]
> 
> WDYT?

Will submit a new version.

Tristan.


  reply	other threads:[~2012-02-14  8:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 15:14 Tristan Gingold
2012-02-13 16:16 ` Joel Brobecker
2012-02-14  8:19   ` Tristan Gingold [this message]
2012-02-14 15:47     ` Joel Brobecker
2012-02-16 14:40   ` Tristan Gingold
2012-02-16 17:19     ` Joel Brobecker
2012-02-17 16:34       ` Tristan Gingold
2012-02-17 16:37         ` Joel Brobecker
2012-02-17 19:23           ` Tristan Gingold
2012-02-20 17:11           ` Tristan Gingold
2012-02-21 18:16             ` Joel Brobecker
2012-02-23 16:34               ` Tristan Gingold

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=D9871EBC-F8D5-4945-88A5-976CB8122074@adacore.com \
    --to=gingold@adacore.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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