[patch] Fix `return' of long/long-long results with no debuginfo

Mark Kettenis mark.kettenis@xs4all.nl
Sat Feb 14 21:59:00 GMT 2009


> Date: Thu, 12 Feb 2009 10:41:34 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> 
> On Wed, 11 Feb 2009 23:44:21 +0100, Mark Kettenis wrote:
> > Thinking a bit more of this now, things all depend on the calling
> > convention.  I'm not convinced casting to `long long' is safe in all
> > cases, especially on 32-bit big-endian machines.  It really might do
> > the wrong thing there, exposing garbage or the wrong 32 bits of the
> > 64-bit value.
> > 
> > The 'int' case is really special in a sense, very much because of the
> > K&R heritage.  It has to work for all types that are sizeof(int) or
> > smaller.
> 
> OK to check-in this patch?
> 
> 2009-02-12  Mark Kettenis  <kettenis@gnu.org>
> 
> 	* stack.c (return_command): Returned type for functions with no debug
> 	info is now the type of user specified expression.

Looks good to me, but please put your own name on the ChangeLog entry.
I just suggested the idea, but I was too lazy to actually write the code ;).



More information about the Gdb-patches mailing list