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: [Patch, microblaze]: Port of Linux gdbserver


Hello Pedro:

Please find the updated patch with below feedbacks incorporated.

Author: Ajit Kumar Agarwal <ajitkum@xhdspdgnu.(none)>
Date:   Tue Sep 23 18:08:46 2014 +0530

    [Patch, microblaze]: Port of Linux gdbserver
    
    This patch is the port of Linux gdbserver.
    
    gdb/ChangeLog:
    2014-09-23  Ajit Agarwal  <ajitkum@xilinx.com>
    
        * configure.tgt (build_gdbserver): New Definition.
        * regformats/microblaze-with-stack-protect.dat (expedite):
        Update the expedite as rpc.
    
    gdb/gdbserver/ChangeLog:
    
        * gdbserver/Makefile.in (microblaze-linux.c): New target.
        * gdbserver/configure.srv (microblaze*-*-linux*): New target.
        * gdbserver/linux-microblaze-low.c: New file.
    
    Signed-off-by:Ajit Agarwal ajitkum@xilinx.com

Thanks & Regards
Ajit

-----Original Message-----
From: Ajit Kumar Agarwal 
Sent: Wednesday, September 17, 2014 1:50 PM
To: 'Pedro Alves'; Michael Eager; Joel Brobecker
Cc: gdb-patches@sourceware.org; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: RE: [Patch, microblaze]: Port of Linux gdbserver



-----Original Message-----
From: Pedro Alves [mailto:palves@redhat.com]
Sent: Wednesday, September 17, 2014 1:45 PM
To: Ajit Kumar Agarwal; Michael Eager; Joel Brobecker
Cc: gdb-patches@sourceware.org; Vinod Kathail; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch, microblaze]: Port of Linux gdbserver

On 09/17/2014 07:16 AM, Ajit Kumar Agarwal wrote:

> From: Pedro Alves [mailto:palves@redhat.com] On 09/16/2014 07:41 AM, 
> Ajit Kumar Agarwal wrote:
>> This is needed as gdbserver code expects the register pc as "pc" instead of "rpc" for baremetel. The microblaze-linux-core.xml is changed from "rpc" to "pc" for gdbserver code to work.
> 
>>> This doesn't make much sense to me.  Can you expand please?  Why would you want the register to be named differently on Linux?  We've defined the >>org.gnu.gdb.microblaze.core with "rpc", presumably because that's what the architecture calls that core register.
> 
>>> Not reporting all the registers with the exact names GDB reports should be making GDB consider the description invalid.  Aren't you seeing that happen?
> 
> In Microblaze gdbserver code linux-microblaze-low.c we have are passing the "pc" in supply_register_by_name and the baremetal org.gnu.gdb.microblaze.core its been defined as "rpc". Due to this in regcache.c where the find_regno function compares "pc" passed with "rpc" and reports failures. That is why we have create microblaze-linux-core.xml to have "pc" instead of "rpc".
> 
> static void
> microblaze_set_pc (struct regcache *regcache, CORE_ADDR pc) {
>   unsigned long newpc = pc;
>   supply_register_by_name (regcache, "pc", &newpc); }

>>But that is port-specific code that you're adding with this patch.
>>So just write instead:

  >>supply_register_by_name (regcache, "rpc", &newpc);

>>Why wouldn't that work?  But maybe I'm missing something.

Thanks Pedro !! I will make the change from "pc" to "rpc" in supply_register_by_name.  

>>> Note nothing is done with valid_p.  It's write-only.  Compare with other ports, like arm-tdep.c or mips-tdep.c.
> 
> Would look into this and will make the modification.

Thanks.

Pedro Alves

Attachment: 0001-Patch-microblaze-Port-of-Linux-gdbserver.patch
Description: 0001-Patch-microblaze-Port-of-Linux-gdbserver.patch


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