From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 750 invoked by alias); 30 Aug 2006 21:44:17 -0000 Received: (qmail 736 invoked by uid 22791); 30 Aug 2006 21:44:17 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Aug 2006 21:44:14 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id 4858026A3D; Wed, 30 Aug 2006 14:44:13 -0700 (PDT) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02973-01-59; Wed, 30 Aug 2006 14:44:12 -0700 (PDT) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id 4CBB126A38; Wed, 30 Aug 2006 14:44:12 -0700 (PDT) Received: from 192.168.92.59 ([192.168.92.59]) by ussunex01.palmsource.com ([192.168.101.9]) via Exchange Front-End Server owa.palmsource.com ([10.0.20.17]) with Microsoft Exchange Server HTTP-DAV ; Wed, 30 Aug 2006 21:44:11 +0000 Received: from svmsnyderlnx by owa.palmsource.com; 30 Aug 2006 14:44:11 -0700 Subject: Re: Into GDB From: Michael Snyder To: Rajesh Warange Cc: gdb@sourceware.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Wed, 30 Aug 2006 21:44:00 -0000 Message-Id: <1156974250.24250.42.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00259.txt.bz2 On Wed, 2006-08-30 at 11:37 +0530, Rajesh Warange wrote: > Hi, > I 'm very much new to GDB. My final goal is to change GDB for a native > chipset of ours. > I need some pointers from you in the right direction. > > 1. I wanted to know the "chain of functions" followed by GDB when we > just type "gdb" on the command-prompt. > 2. also the "chain of functions" when we give commands like step or > breakpoint etc. > > I 'm reading GDB Internals. But its not helping me much in this regard. > Please help. The parts you need to understand for your purpose are fortunately limited. What you need to do is provide a set of methods (for which functional specs exist (after a fashion)) that will allow gdb to do the basic set of debugger-like things with your new target architecture: * read a register * write a register * read a memory location * ... etc. There are a large number of existing examples you can look at, eg. for mips, sparc, x86, sh, h8, etc. They are each in a file named -tdep.c (eg. "mips-tdep.c"). You'll be writing a new module just like one of those, and exporting the same set of function/methods. Michael