Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix gdb.fortran/common-block.exp crash in PIE mode
Date: Mon, 21 Jan 2013 16:13:00 -0000	[thread overview]
Message-ID: <874nia4iri.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20130119224534.GA26330@host2.jankratochvil.net> (Jan	Kratochvil's message of "Sat, 19 Jan 2013 23:45:34 +0100")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> as it thinks it can update it like SYMBOL_VALUE_ADDRESS
Jan> 	CORE_ADDR address;
Jan> due to its LOC_STATIC.

Jan> 	Fix gdb.fortran/common-block.exp crash in PIE mode.
Jan> 	* dwarf2read.c (new_symbol_full) <DW_TAG_common_block>: Use
Jan> 	LOC_COMMON_BLOCK.
Jan> 	* f-valprint.c (info_common_command_for_block): Expect
Jan> 	LOC_COMMON_BLOCK in gdb_assert.
Jan> 	* symtab.h (struct general_symbol_info): Update comment for the
Jan> 	common_block member.
Jan> 	(domain_enum): Extend comment for the COMMON_BLOCK_DOMAIN member.
Jan> 	(enum address_class): New member LOC_COMMON_BLOCK.

Looks good to me.

Perhaps the various symbol-value accessors like SYMBOL_VALUE_ADDRESS
should make assertions about the address class.  This is what GCC does
in its tree accessors.

Like

#define SYMBOL_VALUE_COMMON_BLOCK(symbol) \
  ((gdb_assert (SYMBOL_CLASS (symbol) == LOC_COMMON_BLOCK)), \
   (symbol)->info.value.common_block)

Tom


  reply	other threads:[~2013-01-21 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-19 22:46 Jan Kratochvil
2013-01-21 16:13 ` Tom Tromey [this message]
2013-01-21 16:46   ` [commit] " Jan Kratochvil
2013-02-05 21:14   ` Jan Kratochvil
2013-02-06 16:08     ` 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=874nia4iri.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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