This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

Re: [rfa] Change line to long


Eh.  I give up; I can't figure out the information flow in dwarf2read.c.
I do see a lot of "int" and just a few "long" though.

> I still think it'd be nice if we could somehow guarantee that line
> numbers are represented with at least 31 bits.  I agree that it's
> important to provide the user with an error/warning when a line number
> (or anything else for that matter) can't be accurately represented in
> the space that gdb allocates for it.

Does gdb already require that "int" be at least 32 bits?  If so, then
we could use an "int" or "unsigned int".

I really hate C indeterminate-width types.  Anyone up for C99 types?

  int8_t   uint8_t
  int16_t  uint16_t
  int32_t  uint32_t
  int64_t  uint64_t

Anyways, my original point was that the use of "unsigned short line"
in "struct symbol" was useless, because it doesn't help pack the
structure any tighter, because the enum fields before it are not
packed anyways.  We can get "unsigned int" for free, or we can go
all the way to "unsigned long" for a cost.

Michael

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