Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: fix latent bug in syms_from_objfile_1
Date: Wed, 20 Mar 2013 19:06:00 -0000	[thread overview]
Message-ID: <20130320184034.GA708@host2.jankratochvil.net> (raw)
In-Reply-To: <87ip4m7wxy.fsf@fleche.redhat.com>

On Wed, 20 Mar 2013 19:22:49 +0100, Tom Tromey wrote:
> --- symfile.c	14 Mar 2013 20:26:19 -0000	1.367
> +++ symfile.c	20 Mar 2013 18:19:42 -0000
> @@ -997,7 +997,7 @@
>  
>       We no longer warn if the lowest section is not a text segment (as
>       happens for the PA64 port.  */
> -  if (addrs && addrs->other[0].name)
> +  if (addrs && addrs->num_sections > 0 && addrs->other[0].name)
>      addr_info_make_relative (addrs, objfile->obfd);
>  
>    /* Initialize symbol reading routines for this objfile, allow complaints to

I find it just fixes a regression introduced by:
	commit 2679ab4be931bedfc7987d215bc336b912364906
	Author: Elena Zannoni <ezannoni@kwikemart.cygnus.com>
	Date:   Fri Jun 27 13:11:17 2003 +0000

And it also matches how addr_info_make_relative and other code handles ADDRS.

The problem is that alloc_section_addr_info sets NUM_SECTIONS while they are
not yet filled in which leads to those ugly "&& ->other[x].name" checks...


Thanks,
Jan


  reply	other threads:[~2013-03-20 18:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 18:23 Tom Tromey
2013-03-20 19:06 ` Jan Kratochvil [this message]
2013-03-20 19:53   ` Tom Tromey
2013-03-21 14:41     ` Jan Kratochvil
2013-03-21 15:36       ` Tom Tromey
2013-03-21 16:08         ` Jan Kratochvil
2013-03-21 17:39           ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130320184034.GA708@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox