[Patch] Microblaze: Port of Linux gdbserver

Pedro Alves palves@redhat.com
Fri Dec 19 10:56:00 GMT 2014


On 12/19/2014 08:27 AM, Ajit Kumar Agarwal wrote:

>>> 1. push_dummy_code is not implemented for Micro blaze port  due to this  there are 350+ failures.
>>
>>>> Eh, no inferior function call support.  Are you planning on implementing this?
>>
>> Currently in the gdb  microblaze-tdep.c, the following code is there for push_dummy_code.
>>
>> static CORE_ADDR
>> microblaze_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
>>                             CORE_ADDR funcaddr,
>>                             struct value **args, int nargs,
>>                             struct type *value_type,
>>                             CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
>>                             struct regcache *regcache) {
>>   error (_("push_dummy_code not implemented"));
>>   return sp;
>> }
>> This causes the failures.
> 
>>> Yes, this are the hooks for supporting calling inferior functions from gdb: "print foo()", etc.
> 
>>> The question was whether you were planning on replacing the errors (this and microblaze_push_dummy_call's) with a real implementation.  :-)
> 
> Is this functionality optional as I can see many targets doesn't have the implementation for the inferior call function support. We do have plans for the implementation but I am wondering why this functionality is not implemented for many other targets like ARM.

The real meat is in gdbarch_push_dummy_call, which is throws an
error on microblaze too (it's just below microblaze_push_dummy_code).

gdbarch_push_dummy_code is optional because it's only used if
gdbarch_call_dummy_location is ON_STACK.

Inferior function call functionality is definitely implemented on ARM (and
on most if not all, other ports).  See arm_push_dummy_call.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list