This is the mail archive of the gdb-patches@sourceware.org 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: [patch] Fix `return' of long/long-long results with no debuginfo


> From: Tom Tromey <tromey@redhat.com>
> Date: Tue, 03 Mar 2009 11:10:19 -0700
> 
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> Weighing in on an old-ish thread.  AFAIK this has never reached any
> sort of resolution.
> 
> Jan> Your suggestion ("type of the return value expression given by the user"):
> Jan> + improvement over the current state (one _can_ return long or long long)
> Jan> - may be more tricky to the user (requirement to cast to long or long long if
> Jan>   the inferior function returns such type)
> 
> How about, in the specific case of "return" from a function without
> debug info, we simply require the user to supply a cast to the desired
> type.  This avoids any problems in choosing a default and it helps
> avoid errors introduced by using the type implicit in the expression.

Do we have a way to figure out if such a cast is present in the
expression passed as an argument to the return command?


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