This is the mail archive of the gdb-prs@sources.redhat.com 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: exp/1811: "set var x = y" doesn't work properly if sizeof(x) < sizeof(register)


The following reply was made to PR exp/1811; it has been noted by GNATS.

From: Daniel Jacobowitz <dan@debian.org>
To: Randolph Chung <tausq@debian.org>, gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: exp/1811: "set var x = y" doesn't work properly if sizeof(x) < sizeof(register)
Date: Sun, 21 Nov 2004 11:55:50 -0500

 On Fri, Nov 19, 2004 at 04:38:00PM -0000, Randolph Chung wrote:
 >  well, yes, but....
 >  
 >  gdb doesn't do the sign extension right? it just writes the byte into
 >  the register. if i look at the code that gcc generates, it looks
 >  something like:
 
 Yes.  My opinion is that GDB probably -should- do the sign extension.
 When storing into a value which lives in a register, convert it to the
 type of the register.
 
 I'm not sure if we can do this cleanly; consider a struct of word
 size that lives in a register.  We've got to represent that somehow,
 and now we don't.
 
 -- 
 Daniel Jacobowitz


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