[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] gdb support from gcc-cobol
From: |
Keisuke Nishida |
Subject: |
Re: [open-cobol-list] gdb support from gcc-cobol |
Date: |
Mon Jun 2 00:22:21 2003 |
User-agent: |
Wanderlust/2.10.0 (Venus) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (UnebigoryĆmae) APEL/10.3 Emacs/21.2 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) |
At Sun, 01 Jun 2003 22:19:18 +0200,
Bernard Giroud wrote:
>
> > WORKING-STORAGE SECTION.
> > 01 G.
> > 02 X PIC X(2).
> > 02 Y PIC X(2).
> >
> > the address of X and Y are expressed by "b_G + 0" and
> > "b_G + 2" respectively. How could you store these information?
>
> I checked this; it is not sufficient actually.
> Only the group information is present.
The current compiler does an optimization that eliminates
unused field descriptions from the output. That is, the
following program
IDENTIFICATION DIVISION.
PROGRAM-ID. prog.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 G.
02 X PIC X(2).
02 Y PIC X(2).
PROCEDURE DIVISION.
DISPLAY Y.
will be converted into something like this:
int prog ()
{
...
static unsigned char b_G[4];
static cob_field f_Y = {2, b_G + 2, &cob_alnum_attr};
cob_display (&f_Y);
...
}
Probably we should output all field descriptions (i.e.,
f_G, f_X, and f_Y) when the option `-g' is turned on.
Do you think this is sufficient to access all fields?
There might be other issues on field access. The output
does not contain anything about the OCCURS ... [DEPENDING
ON ...] clause. Maybe we need some extension.
Keisuke
- Re: [open-cobol-list] gdb support from gcc-cobol, Bernard Giroud, 2003/06/01
- Re: [open-cobol-list] gdb support from gcc-cobol,
Keisuke Nishida <=
- Re: [open-cobol-list] gdb support from gcc-cobol, David Essex, 2003/06/02
- Re: [open-cobol-list] gdb support from gcc-cobol, Bernard Giroud, 2003/06/03
- Re: [open-cobol-list] gdb support from gcc-cobol, Keisuke Nishida, 2003/06/03
- Re: [open-cobol-list] gdb support from gcc-cobol, Bernard Giroud, 2003/06/03
- Re: [open-cobol-list] gdb support from gcc-cobol, Keisuke Nishida, 2003/06/04
- Re: [open-cobol-list] gdb support from gcc-cobol, Bernard Giroud, 2003/06/05
- Re: [open-cobol-list] gdb support from gcc-cobol, Keisuke Nishida, 2003/06/05