This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Add DW_FORM_strp support
- To: Jakub Jelinek <jakub at redhat dot com>
- Subject: Re: [PATCH] Add DW_FORM_strp support
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 08 Nov 2001 22:26:29 -0500
- Cc: gdb-patches at sources dot redhat dot com
- References: <20011107140356.T739@sunsite.ms.mff.cuni.cz>
> +#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