[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] gdb support from gcc-cobol
From: |
Bernard Giroud |
Subject: |
Re: [open-cobol-list] gdb support from gcc-cobol |
Date: |
Tue Jun 3 13:09:06 2003 |
Keisuke Nishida a écrit :
> At Tue, 03 Jun 2003 08:19:25 +0200,
> Bernard Giroud wrote:
> >
> > > Perhaps this may be naive, but shouldn't the above be converted into a
> > > structure ?
> > >
> > > struct elem_G
> > > {
> > > unsigned char X[2];
> > > unsigned char Y[2];
> > > };
> > >
> > > static struct elem_G f_G;
>
> I initially thought about it, but how would you represent
> REDEFINES and RENAMES?
REDEFINES only inherits the address of the redefined item
address; it does not induce a particular format (might be
a group or an elementary). RENAMES also, except
it can span over several items, IFAIR.
> How would you implement reference
> modification such as G(2:2)?
>
This is an implicit X(2) starting at the address G+2;
so for gdb, only G should be known, and the work
of G+2 for 2 chars must by done by the language
front-end of gdb. For the descriptors, we could
find a f_static_refmod_nnnn field with the correct
content.
>
> COBOL assumes the data field is sequential and it is accessed
> in a variety of ways. I think trying to translate COBOL data
> items into a C structure makes things complex.
>
I agree it is a little more complex, but it is much more
natural. Another aspect: this is probably a point of
divergence between OC and gcc-cobol (aka Gobol).
>
> Keisuke
>
--
Bernard Giroud
TinyCOBOL and Gobol Developer
- 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, 2003/06/02
- 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 <=
- 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