This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix `return' of long/long-long results with no debuginfo
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, drow at false dot org, gdb-patches at sourceware dot org
- Date: Tue, 03 Mar 2009 11:10:19 -0700
- Subject: Re: [patch] Fix `return' of long/long-long results with no debuginfo
- References: <20090211194511.GA9324@host0.dyn.jankratochvil.net> <200902112040.n1BKdxb3028188@brahms.sibelius.xs4all.nl> <20090211205045.GB9762@caradoc.them.org> <200902112122.n1BLMf8q000100@brahms.sibelius.xs4all.nl> <20090211214646.GA22247@host0.dyn.jankratochvil.net> <200902112157.n1BLvplk011339@brahms.sibelius.xs4all.nl> <20090211220824.GA26040@host0.dyn.jankratochvil.net> <200902112237.n1BMbbOb006035@brahms.sibelius.xs4all.nl> <20090211225012.GA28683@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "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.
Tom