Re: [patch] Set calling convention of methods

Joel Brobecker
2009-09-30T16:25:22Z

> 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