Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: cagney@gnu.org
Cc: gdb@sources.redhat.com
Subject: Re: Fallout from value changes?
Date: Sun, 14 Nov 2004 20:41:00 -0000	[thread overview]
Message-ID: <200411141546.iAEFkvOS010674@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <200411141437.iAEEbiCc010466@elgar.sibelius.xs4all.nl> (message from Mark Kettenis on Sun, 14 Nov 2004 15:37:44 +0100 (CET))

Replying to my onw message:

   Date: Sun, 14 Nov 2004 15:37:44 +0100 (CET)
   From: Mark Kettenis <kettenis@gnu.org>

   Hi Andrew,

   I noticed this new testsuite failure on i386-unknown-freebsd4.7:

   -PASS: gdb.base/store.exp: up struct 4 u; print new u, expecting {s = \{1, 2, 3, 4}}
   +FAIL: gdb.base/store.exp: up struct 4 u; print new u, expecting {s = \{1, 2, 3, 4}}

This is caused by this patch:

2004-11-12  Andrew Cagney  <cagney@gnu.org>

	* defs.h (enum lval_type): Delete lval_reg_frame_relative.
	* value.h (struct value): Update comment.
	* valops.c (value_assign): Fold lval_reg_fame_relative into
	lval_register.
	* findvar.c (value_from_register, locate_var_value): Ditto.

which breaks valops.c:value_assign().  That function contains the
following bit of code:

    case lval_register:
      {
	struct frame_info *frame;
	int value_reg;

	/* Figure out which frame this is in currently.  */
	if (VALUE_LVAL (toval) == lval_register)
	  {
	    frame = get_current_frame ();
	    value_reg = VALUE_REGNUM (toval);
	  }
	else
	  {
	    frame = frame_find_by_id (VALUE_FRAME_ID (toval));
	    value_reg = VALUE_REGNUM (toval);
	  }

The if statement doesn't make sense; it's always true.  As a result
the function will never do proper frame-relative assigns.  Simply
removing the if-clause isn't a good solution since that will break
assigning to non-frame-relative register variables.  I guess we'll
have to change GDB such that it always initializes VALUE_FRAME_ID to
say null_frame_id, and using get_current_frame() in that case.

Please revert the patch above, or fix this properly.

Mark


  reply	other threads:[~2004-11-14 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-14 15:47 Mark Kettenis
2004-11-14 20:41 ` Mark Kettenis [this message]
2004-11-16  0:37   ` Andrew Cagney

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=200411141546.iAEFkvOS010674@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=cagney@gnu.org \
    --cc=gdb@sources.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