Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de>
To: drow@false.org (Daniel Jacobowitz)
Cc: weigand@i1.informatik.uni-erlangen.de (Ulrich Weigand),
	cagney@gnu.org (Andrew Cagney),
	gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Fix frame ID comparison problem on s390
Date: Sun, 27 Jun 2004 22:35:00 -0000	[thread overview]
Message-ID: <200406272234.AAA10516@faui1m.informatik.uni-erlangen.de> (raw)
In-Reply-To: <20040627214831.GA30684@nevyn.them.org> from "Daniel Jacobowitz" at Jun 27, 2004 05:48:31 PM

Daniel Jacobowitz wrote:

> Some future version of GCC will warn about this mistake.  The only
> valid values for "int : 1" are 0 and -1.

Good point, I had forgotten about this.  B.t.w. according to C99,
it is actually implementation-defined whether a bit field type 'int'
is signed or unsigned.  (Which still means it is a good idea to
explicitly use 'unsigned int', of course.)

Fixed by the following patch.  Tested on s390-ibm-linux and
s390x-ibm-linux, committed to mainline as obvious.

Bye,
Ulrich


ChangeLog:

	* frame.h (struct frame_id): Change bit field type of stack_addr_p, 
	code_addr_p and special_addr_p to 'unsigned int'.

Index: gdb/frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.135
diff -c -p -r1.135 frame.h
*** gdb/frame.h	27 Jun 2004 20:45:05 -0000	1.135
--- gdb/frame.h	27 Jun 2004 22:12:00 -0000
*************** struct frame_id
*** 124,132 ****
    CORE_ADDR special_addr;
  
    /* Flags to indicate the above fields have valid contents.  */
!   int stack_addr_p : 1;
!   int code_addr_p : 1;
!   int special_addr_p : 1;
  };
  
  /* Methods for constructing and comparing Frame IDs.
--- 124,132 ----
    CORE_ADDR special_addr;
  
    /* Flags to indicate the above fields have valid contents.  */
!   unsigned int stack_addr_p : 1;
!   unsigned int code_addr_p : 1;
!   unsigned int special_addr_p : 1;
  };
  
  /* Methods for constructing and comparing Frame IDs.


-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


  reply	other threads:[~2004-06-27 22:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20 13:31 Ulrich Weigand
2004-05-20 14:17 ` Daniel Jacobowitz
2004-05-24 13:45   ` Ulrich Weigand
2004-05-24 18:52     ` Andrew Cagney
2004-06-09 14:12       ` Ulrich Weigand
2004-06-09 14:55         ` Andrew Cagney
2004-06-16 13:48           ` Ulrich Weigand
2004-06-16 17:33             ` Andrew Cagney
2004-06-27 20:48               ` Ulrich Weigand
2004-06-27 21:48                 ` Daniel Jacobowitz
2004-06-27 22:35                   ` Ulrich Weigand [this message]
2004-06-27 22:59                   ` Andreas Schwab
2004-06-27 23:11                     ` Daniel Jacobowitz

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=200406272234.AAA10516@faui1m.informatik.uni-erlangen.de \
    --to=weigand@i1.informatik.uni-erlangen.de \
    --cc=cagney@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@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