* GDB 5.1/mi status and question on table output
@ 2001-05-14 10:08 Andrew Cagney
2001-05-14 12:00 ` Fernando Nasser
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2001-05-14 10:08 UTC (permalink / raw)
To: GDB Discussion
FYI,
The GDB/MI interface is now sitting just before the point of no return.
I've completed all the changes that are possible without actually
affecting the output.
The task that is left is to review each of the unofficial MI commands
and update them so that they output combinations of tuples and lists
instead of just tuples.
The first an obvious question is, what should a table look like when
output by MI. The doco refelcts the current output, my first guess is
to change MI so that it outputs:
{
hdr={heading, heading, ...},
body=[{r1c1, r1c2, ...}, {r2c1, r2c2, ...}, ...]
}
Comments?
There are a fixed number of columns to the table and each column has a
name. Hence a tuple for each row and the heading.
The number of rows, however, varies, but each one is identical, hence a
list of rows.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: GDB 5.1/mi status and question on table output
2001-05-14 10:08 GDB 5.1/mi status and question on table output Andrew Cagney
@ 2001-05-14 12:00 ` Fernando Nasser
2001-05-14 17:48 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Fernando Nasser @ 2001-05-14 12:00 UTC (permalink / raw)
To: Andrew Cagney; +Cc: GDB Discussion
Andrew Cagney wrote:
>
> FYI,
>
> The GDB/MI interface is now sitting just before the point of no return.
> I've completed all the changes that are possible without actually
> affecting the output.
>
> The task that is left is to review each of the unofficial MI commands
> and update them so that they output combinations of tuples and lists
> instead of just tuples.
>
> The first an obvious question is, what should a table look like when
> output by MI. The doco refelcts the current output, my first guess is
> to change MI so that it outputs:
>
> {
> hdr={heading, heading, ...},
> body=[{r1c1, r1c2, ...}, {r2c1, r2c2, ...}, ...]
> }
>
> Comments?
>
> There are a fixed number of columns to the table and each column has a
> name. Hence a tuple for each row and the heading.
> The number of rows, however, varies, but each one is identical, hence a
> list of rows.
>
I like the format but I have a couple of concerns:
Currently there are "headings" and "field names" and they may not be the same. I think this was done so that a GUI could be implemented fast and cope with tables that have different columns depending on certain circumstances (the breakpoint table is such a beast). I am not saying that this is the right thing, just the way it is now. The UI code using the MI currently has the option of ignoring or using the headings.
But we may change that and say that we only supply the field names and values. The problem is that we now have two ways of outputting fields: when inside a table they go without the name; when outside they go with the name.
On one hand, a more compact output without the repetition of names is appealing. On the other hand, if you have an option to get a table of breakpoints or information about a specific breakpoint, now you'll get the information about one item (breakpoint) in two different ways, depending if it came on a table (w/o field names) or as a unit (with field names).
P.S.: I am really affraid of last minute changes in the output syntax.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: GDB 5.1/mi status and question on table output
2001-05-14 12:00 ` Fernando Nasser
@ 2001-05-14 17:48 ` Andrew Cagney
2001-05-15 6:13 ` Fernando Nasser
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2001-05-14 17:48 UTC (permalink / raw)
To: Fernando Nasser; +Cc: GDB Discussion
> There are a fixed number of columns to the table and each column has a
>> name. Hence a tuple for each row and the heading.
>> The number of rows, however, varies, but each one is identical, hence a
>> list of rows.
>>
>
>
> I like the format but I have a couple of concerns:
>
> Currently there are "headings" and "field names" and they may not be the same. I think this was done so that a GUI could be implemented fast and cope with tables that have different columns depending on certain circumstances (the breakpoint table is such a beast). I am not saying that this is the right thing, just the way it is now. The UI code using the MI currently has the option of ignoring or using the headings.
>
> But we may change that and say that we only supply the field names and values. The problem is that we now have two ways of outputting fields: when inside a table they go without the name; when outside they go with the name.
>
> On one hand, a more compact output without the repetition of names is appealing. On the other hand, if you have an option to get a table of breakpoints or information about a specific breakpoint, now you'll get the information about one item (breakpoint) in two different ways, depending if it came on a table (w/o field names) or as a unit (with field names).
Ah, yes, forgot about that nastyness.
> P.S.: I am really affraid of last minute changes in the output syntax.
Which brings up option (B).
Should, for 5.1 the existing table->tuple functions be left as is?
A new interface that directly maps table calls on to correct list/tuple
functions could then be added instead.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GDB 5.1/mi status and question on table output
2001-05-14 17:48 ` Andrew Cagney
@ 2001-05-15 6:13 ` Fernando Nasser
0 siblings, 0 replies; 4+ messages in thread
From: Fernando Nasser @ 2001-05-15 6:13 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Fernando Nasser, GDB Discussion
Andrew Cagney wrote:
>
> Which brings up option (B).
>
> Should, for 5.1 the existing table->tuple functions be left as is?
> A new interface that directly maps table calls on to correct list/tuple
> functions could then be added instead.
>
Several interfaces provide a simplifies result for those who can consume
it (i.e., don't need any of what was left behind), so I think this is a
good idea. But, as you say, let's wait for people to ask for it. The
best way of testing this things is by letting people go and use it. I
just hope they do give us the feedback and the suggestions for
improvement.
Cheers,
Fernando
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-05-15 6:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-14 10:08 GDB 5.1/mi status and question on table output Andrew Cagney
2001-05-14 12:00 ` Fernando Nasser
2001-05-14 17:48 ` Andrew Cagney
2001-05-15 6:13 ` Fernando Nasser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox