Re: Emacs mode for GDB - 2 questions

From:

Nick Roberts

Subject:

Re: Emacs mode for GDB - 2 questions

Date:

Thu, 30 May 2002 22:16:15 +0100

Richard Stallman writes:
> 2) I want to format the displayed expressions more tidily. In particular
> I would like to show array slices and the header line would be a good
> place to do this e.g.
>
> ------------main::a [start:end:step]---------------
>
> Where start, end and step are in editable fields. Could emacs be given
> this
> feature easily ?
>
> Precisely what feature?
Sorry, I should be clearer. I want a default format for arrays like :
---main::a [::]---- (line generated on creation of frame/window)
a[0] = 1.0
a[1] = 2.0
a[2] = 3.0
a[3] = 4.0
a[4] = 4.0
a[5] = 4.0
a[6] = 4.0
etc
and to be able to specify slices e.g every other element of the first six :
---main::a [0:5:2]----
a[0] = 1.0
a[2] = 3.0
a[4] = 4.0
With a large array, if the top line was in the buffer it would scroll out of
view. I would like to be able to enter the three digits (0,5,2 in this case)
into the header line.
If the effort cannot be justified, I'll think of something else.
Nick