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


> +#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.

enjoy,
Andrew



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