From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21430 invoked by alias); 28 May 2003 22:55:00 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21423 invoked from network); 28 May 2003 22:54:59 -0000 Received: from unknown (HELO stardust.solidas.com) (217.13.28.68) by sources.redhat.com with SMTP; 28 May 2003 22:54:59 -0000 Received: from solidas.com (217-13-28-83.dd.nextgentel.com [217.13.28.83]) (authenticated) by stardust.solidas.com (8.11.6/8.11.6) with ESMTP id h4SMswl29560 for ; Thu, 29 May 2003 00:54:58 +0200 Message-ID: <3ED53E58.5070502@solidas.com> Date: Wed, 28 May 2003 22:55:00 -0000 From: "Svein E. Seldal" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030521 Debian/1.3.1-1 X-Accept-Language: en MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Porting advice or documentation request References: <3E81F982.5080802@solidas.com> <3E84D30C.9000104@redhat.com> <3E8BFD78.2050502@solidas.com> <3E8E3751.3040502@redhat.com> In-Reply-To: <3E8E3751.3040502@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00379.txt.bz2 Hi all, I'm working on this new gdb port, and more than often I'm stuck. I have been told that the d10v port is the most authorative template for how new targets should be written. Unfortunately it is impossible to learn anything about the d10v's hardware architecture on the net, so I find it a bit difficult to template from. It is simple enough to copy the functions and such from the d10v's implemenation, but in many cases I have *no* idea what the function I'm implementing really does. E.g. what parts of the port are spesialised d10v parts and should not be copied, and which are general port implementations that should be copied, etc. One pratical example is the struct frame_unwind table included in the target. It refers to "xxx_frame_this_id" and "xxx_frame_prev_register", which in turn performs some magic that I'm unable to make out. I understand from the docs that the xxx_frame_this_id should return the calling function's frame, but in the d10v port, there is much code that I dont understand what is. And the list of gdbarch funtions are long, and my general impression is that I dont know which functions are required and which are there for special cases. What functions *must* I have implemented? So please, please, please, does anyone have any pointers on how to understand gdb to get this port up and running? How can I best understand the gdbarch functions? I've read the gdb, gdb-internals manual and I'm grepping a lot of code, debugging gdb itself, but I'm still confused and uninformed. :( So far I have at least a little bit. I have this TCP remote GDB server which talks to real hardware. And I've managed to get communication with it from GDB. I am able to place breakpoints, step code, etc. But as soon as I do anything more complex, like dumping the frame or printing the registers it either dies with a segfault or issues a gdb error. But again, generally I dont really know *why* things fail, because I dont understand *what* I need to do or *where* to put it. ... help please. Regards, Svein