This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Stab type information in string field


Hi,

On Fri, Mar 21, 2003 at 03:03:34PM -0800, Ian Lance Taylor wrote:
> I don't know which version of the document you are reading.  The
> current document, available at, e.g.,
>     http://sources.redhat.com/gdb/download/onlinedocs/stabs_1.html#SEC1
> says this:
> 
>     A type-number is often a single number. The GNU and Sun tools
>     additionally permit a type-number to be a pair
>     (file-number,filetype-number) (the parentheses appear in the
>     string, and serve to distinguish the two cases). The file-number
>     is 0 for the base source file, 1 for the first included file, 2
>     for the next, and so on. The filetype-number is a number starting
>     with 1 which is incremented for each new type defined in the
>     file. (Separating the file number and the type number permits the
>     N_BINCL optimization to succeed more often; see 2.3 Names of
>     Include Files).

I have some more questions regarding the so-called "N_BINCL
optimization".  From my understanding, "N_EXCL foo.h" means:
all the types that were defined the *last time* foo.h was included are
available again now (with the same type number).

Also, if an "N_BINCL foo.h" occurs after another "N_BINCL foo.h", then I
distinguish two cases:
  - either the first inclusion occured in the same source file in which
    case types that were defined there should still be available (new
    type definitions just get added to the current list);
  - or the first inclusion occured in another source file in which case
    types that were defined there become unavailable.

However, it seems that I got something wrong because I sometimes
encounter type definitions for types which I supposed to be already
known.

Could someone help me with the exact semantics of BINCL/EXCL?

Thanks,
Ludovic.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]