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: [PATCH] Add DW_FORM_strp support


On Thu, Nov 08, 2001 at 10:26:29PM -0500, Andrew Cagney wrote:
> > +#if HOST_CHAR_BIT == 8
> > +  if (dwarf_str_buffer[str_offset] == '\0')
> > +    return NULL;
> > +  return dwarf_str_buffer + str_offset;
> > +#else
> > +  {
> > +    unsigned int len;
> > +
> > +    return read_string (abfd, dwarf_str_buffer + str_offset, &len);
> > +  }
> > +#endif
> 
> Just FYI (this isn't my file :-).  If the HOST's char size isn't 8, GDB 
> won't even build (grep for ``you loose'' in the sources).  A 
> ``gdb_assert (HOST_CHAR_SIZE == 8)'' wouldn't hurt though.  If the test 
> has something to do with the target's object file's char size though 
> then the above is wrong.

read_string does this, so I wanted to match what it does too.

	Jakub


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