From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29257 invoked by alias); 14 May 2009 16:46:26 -0000 Received: (qmail 29246 invoked by uid 22791); 14 May 2009 16:46:25 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,FS_NEW_XXX,SARE_MSGID_LONG40,SPF_PASS,URIBL_GREY X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.186) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 May 2009 16:46:20 +0000 Received: by ti-out-0910.google.com with SMTP id a1so146022tib.12 for ; Thu, 14 May 2009 09:46:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.31.5 with SMTP id e5mr181314tie.35.1242319576684; Thu, 14 May 2009 09:46:16 -0700 (PDT) In-Reply-To: <8502af3c0905140746h7042ba95ja458737b87e82f81@mail.gmail.com> References: <8502af3c0905140623nece4f1dv1e03c2c841c59e42@mail.gmail.com> <130942881126505163@unknownmsgid> <8502af3c0905140746h7042ba95ja458737b87e82f81@mail.gmail.com> Date: Thu, 14 May 2009 16:46:00 -0000 Message-ID: Subject: Re: new port From: Hui Zhu To: Florent DEFAY Cc: Anthony Berent , jeremy.bennett@embecosm.com, gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00079.txt.bz2 http://teawater.googlepages.com/epgdb1.txt This doc is about porting gdb. It told something about howto write frame part. It is old but maybe can help something. http://sourceware.org/gdb/current/onlinedocs/gdbint_7.html#SEC45 Gdbint introduce something about frame too. Thanks, Hui On Thu, May 14, 2009 at 22:46, Florent DEFAY wrote: > Thank you very much for the tips. You are right. > > When I step into the function with stepi: > (1) If I try 'info frame' just before the first instruction, then > results an internal error. > (2) If I try 'info frame' just after the first intsuction, then I get > frame information. > > I set up traces to know which functions GDB crosses in my target-tdep.c. > I can tell that skip_prologue is called only after processing the > first instruction, > I think it should be called before, shouldn't it? > > Thank you for the HOWTO, I jump on it. > > Regards. > > Florent > > 2009/5/14 Anthony Berent : >> Florent, >> >> I have also been porting to a new architecture, and recently solved similar >> problems with next. The way next works is that, after a step, it checks >> whether an extra frame has been added to the stack. If it has, and various >> other checks are satisfied, then it places a breakpoint on the return >> address and runs on. Otherwise it simply stops after the first step. >> >> Try stepping into the function using stepi, stopping at its first >> instruction, and then having a look at the stack frames (using bt and "info >> frames"). If these look wrong then that is probably your problem. >> >> - Anthony >> >> -----Original Message----- >> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf >> Of Florent DEFAY >> Sent: 14 May 2009 14:24 >> To: gdb@sourceware.org >> Subject: new port >> >> Hi, >> >> I work on porting GDB to a new arch. >> I already ported GCC. >> >> I meet some problems, I need help. >> >> At the moment, I can use most of basic GDB commands. >> >> I can set breakpoints and stop on them. I can set breakpoints on function >> names. >> I can step. I can read locals and registers. >> >> When I use the command 'next', it should step and skip functions. The >> problem is that >> indeed it steps but it does not skip functions. It step into the function. >> >> Please help. >> >> >> Regards. >> >> Florent >> >> >> >