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: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [PATCH] Add DW_FORM_strp support
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 9 Nov 2001 04:29:28 -0500
- Cc: gdb-patches at sources dot redhat dot com
- References: <20011107140356.T739@sunsite.ms.mff.cuni.cz> <3BEB4CE5.8070407@cygnus.com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
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