This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: build somread everywhere
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 04 Jan 2013 17:59:11 +0000
- Subject: Re: RFC: build somread everywhere
- References: <8738yj8eh6.fsf@fleche.redhat.com>
On 01/02/2013 09:25 PM, Tom Tromey wrote:
> This patch arranges for somread.c to be built on any host that has the
> needed BFD support. It also updates somread.c so that it no longer
> depends on a host-specific header; these parts are based on similar code
> in BFD.
>
> John David Anglin tested this on his HP-UX machine.
>
> In the absence of comments I plan to put this in.
For the record, I think this is a good idea. The patch
looks fine to me.
> @@ -100,14 +100,20 @@ som_symtab_read (bfd *abfd, struct objfile *objfile,
> for (bufp = buf; bufp < endbufp; ++bufp)
> {
> enum minimal_symbol_type ms_type;
> + unsigned int flags = bfd_getb32 (bufp->flags);
> + unsigned int symbol_type =
> + (flags >> SOM_SYMBOL_TYPE_SH) & SOM_SYMBOL_TYPE_MASK;
> + unsigned int symbol_scope =
> + (flags >> SOM_SYMBOL_SCOPE_SH) & SOM_SYMBOL_SCOPE_MASK;
> + CORE_ADDR symbol_value = bfd_getb32 (bufp->symbol_value);
'=' should go at the beginning of next line though.
--
Pedro Alves