This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: RFC: build somread everywhere


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


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