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: Fix Ericsson DICOS inferior function calls


> From: Pedro Alves <pedro@codesourcery.com>
> Date: Mon, 7 Jul 2008 23:09:55 +0100
> 
> Hi,
> 
> This patch fixes inferior function calls on DICOS, by putting
> the call dummy breakpoint location on the stack.  The comments
> in the patch describe why.
> 
> Daniel approved this offline, so I checked it in.

Hmm, the reason for providing frame_align() is pretty bogus;
instruction alignment has little or nothing to do with stack
alignment.  It's just that most RISC ISAs require strict memory
alignment at something that happens to be a multiple of the
instruction size.

I'm also not sure the frame_align() you wrote does what you think it
does.  IIRC, on i386, you'll actually need to align on an odd 8-byte
border to get the performance benefit you mention;
i386_push_dummy_call() should take care of that (but may currently not
do that in all cases).

I think we should get rid of generic_push_dummy_code(), and instead
require that each target that puts the dummy breakpoint on the stack
provides its own push_dummy_code() function.  Could you provide one
for DICOS?

> 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
> 
> 	* i386-dicos-tdep.c: Include "inferior.h".
> 	(i386_dicos_frame_align): New.
> 	(i386_dicos_init_abi): Register i386_dicos_frame_align.  Set call
> 	dummy location ON_STACK.
> 	* Makefile.in (i386-dicos-tdep.o): Depend on $(inferior_h).


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