Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Florent DEFAY <spira.inhabitant@gmail.com>
Cc: Anthony Berent <Anthony.Berent@arm.com>,
	jeremy.bennett@embecosm.com, gdb@sourceware.org
Subject: Re: new port
Date: Thu, 14 May 2009 16:46:00 -0000	[thread overview]
Message-ID: <daef60380905140946r5757ea78p2b8c7726e22f9378@mail.gmail.com> (raw)
In-Reply-To: <8502af3c0905140746h7042ba95ja458737b87e82f81@mail.gmail.com>

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 <spira.inhabitant@gmail.com> 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 <Anthony.Berent@arm.com>:
>> 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
>>
>>
>>
>


      reply	other threads:[~2009-05-14 16:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 13:24 Florent DEFAY
2009-05-14 13:50 ` Hui Zhu
2009-05-14 14:05 ` Anthony Berent
2009-05-14 14:37   ` Jeremy Bennett
2009-05-20  8:26     ` Florent DEFAY
2009-05-20 14:12       ` Joel Brobecker
2009-05-22 12:24         ` Florent DEFAY
2009-05-22 14:43           ` Joel Brobecker
2009-05-25  7:17             ` Florent DEFAY
2009-05-25 14:59               ` Florent DEFAY
     [not found] ` <130942881126505163@unknownmsgid>
2009-05-14 14:46   ` Florent DEFAY
2009-05-14 16:46     ` Hui Zhu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=daef60380905140946r5757ea78p2b8c7726e22f9378@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=Anthony.Berent@arm.com \
    --cc=gdb@sourceware.org \
    --cc=jeremy.bennett@embecosm.com \
    --cc=spira.inhabitant@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox