This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Set calling convention of methods
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jonas Maebe <jonas dot maebe at elis dot ugent dot be>
- Cc: Tom Tromey <tromey at redhat dot com>, Mark Kettenis <mark dot kettenis at xs4all dot nl>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Wed, 30 Sep 2009 09:25:10 -0700
- Subject: Re: [patch] Set calling convention of methods
- References: <7B6EF4DA-76C8-4D9C-8B9F-94153EF1C4E1@elis.ugent.be> <m3zleb2ne3.fsf@fleche.redhat.com> <691B0BA8-C606-42FF-A796-76CC9C31556A@elis.ugent.be> <200904222215.n3MMF0p2006994@brahms.sibelius.xs4all.nl> <19C107AA-5271-4C23-A6D2-AFF75BBAC4E4@elis.ugent.be> <m3bpp3oode.fsf@fleche.redhat.com> <5AA3BCA9-1ECF-446E-8B49-3132F0E470FB@elis.ugent.be> <20090930000225.GA10338@adacore.com> <8F3B6095-4766-432D-ABB5-AB4DAA2D5572@elis.ugent.be> <267A47C4-C452-4EC5-B74E-7C5C26AF227E@elis.ugent.be>
> Additionally, I've added a test, because even in my previous new version
> I messed up struct returns. This test should prevent that from happening
> again.
Thanks for doing that, we really like testcases, so I appreciate
the effort.
> 2009-09-30 Jonas Maebe <jonas.maebe <at> elis.ugent.be>
>
> Add support for the "Borland fastcall" calling convention.
>
> * dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant.
> * i386-tdep.c: #include dwarf2.h
> (i386_borland_fastcall_push_dummy_call): New.
> (i386_push_dummy_generic_call): Renamed i386_push_dummy_call.
> (i386_push_dummy_call): New dispatch function that calls
> i386_generic_push_dummy_call or i386_push_dummy_borland_fast_call
> depending on the calling convention.
Overall, this looks OK to me, but Mark seemed interested in reviewing
this patch, so please wait for his comments as well. Again, I think
that dwarf2.h needs to be approved by binutils - it's probably going
to be routine, but you never know.
> * gdb.dwarf2/dw2-borland_fastcall.exp: New.
> * gdb.dwarf2/dw2-borland_fastcall.S: New.
The .S file needs a copyright header. Would you be able to re-generate
the file with -dA, by any chance. It makes the DWARF data more readable.
Otherwise, no problem, it's already fine as it is.
> +if { ![runto_main] } {
> + gdb_suppress_tests;
> +}
We do not use gdb_suppress_tests anymore. runto_main already logs
a FAIL if it does not work, so you can simply return -1 for instance.
I don't think the return value makes any difference in our context.
--
Joel