Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Florent DEFAY <spira.inhabitant@gmail.com>
To: gdb@sourceware.org
Subject: scan_prologue/next, misunderstanding
Date: Tue, 19 May 2009 12:37:00 -0000	[thread overview]
Message-ID: <8502af3c0905190536m326f1de9n6d3da92eb659bd42@mail.gmail.com> (raw)

Hi,

I am still working on a new GDB port.

I got inspiration from avr-tdep.c. I still have problems with 'next'.
I set a 'printf' in the function skip_prologue and I can tell it is never used.

I read  the function avr_scan_prologue and avr_frame_unwind_cache.
It seems like avr_frame_unwind_cache should be called by GDB after the
prologue has been executed. I think that because
once avr_scan_prologue has been processed, there is:
_________________________________________________________________________
      /* The SP was moved to the FP.  This indicates that a new frame
         was created.  Get THIS frame's FP value by unwinding it from
         the next frame.  */
      this_base = get_frame_register_unsigned (this_frame, AVR_FP_REGNUM);
      high_base = get_frame_register_unsigned (this_frame,
AVR_FP_REGNUM+1);
      this_base += (high_base << 8);
_________________________________________________________________________
I think this_base would not have the right value if it was processed
before the end of
execution of the prologue.

But I set 'printf' in these functions and in my case they are used at
each 'step'.
Moreover, I think these functions are necessary to find the end of the prologue,
so the end of the prologue cannot be known inside.

Please set me straight about that.

Regards.

Florent


             reply	other threads:[~2009-05-19 12:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 12:37 Florent DEFAY [this message]
2009-05-19 13:33 ` Joel Brobecker
2009-05-19 13:39   ` Tristan Gingold

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=8502af3c0905190536m326f1de9n6d3da92eb659bd42@mail.gmail.com \
    --to=spira.inhabitant@gmail.com \
    --cc=gdb@sourceware.org \
    /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