Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simark@simark.ca>
Cc: John Darrington <john@darrington.wattle.id.au>,
	 gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] GDB: New target s12z
Date: Tue, 28 Aug 2018 15:35:00 -0000	[thread overview]
Message-ID: <87pny27bcn.fsf@tromey.com> (raw)
In-Reply-To: <510acbee-2338-0c20-8e32-8d6ef83be3e1@simark.ca> (Simon Marchi's	message of "Sun, 26 Aug 2018 14:15:03 -0400")

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

Simon> The usual thing to do (I looked at a few other arches) is to use the same value as the
Simon> canonical frame address as defined by DWARF (Section 6.4 in DWARF5.pdf), which is the
Simon> value of the stack pointer just before that frame was created.

Simon> This is of course not mandatory, but I suppose that adhering to this de facto rule could
Simon> make things clearer.

ISTR there was one obscure case where it was necessary -- I think some
architectures have a special epilogue unwinder, and it was important
that this unwinder agree with the DWARF unwinder about the CFA in some
case.  This was many years ago so as you can tell I don't really recall
the details.

Anyway, I think using the current frame's SP will fail if the function
uses alloca -- the frame id will change across a step.  The CFA is
usually used in order to make the frame id invariant.  There may be a
comment in one of the frame*.h files explaining this.

Tom


  parent reply	other threads:[~2018-08-28 15:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 17:35 [PATCH 1/3] gdb: Added builtin types for 24 bit integers John Darrington
2018-08-23 17:35 ` [PATCH 3/3] GDB: New target s12z John Darrington
2018-08-23 17:56   ` Eli Zaretskii
2018-08-26 17:19   ` Simon Marchi
2018-08-26 17:41     ` John Darrington
2018-08-26 18:16       ` Simon Marchi
2018-08-26 22:55         ` Simon Marchi
2018-08-27  6:30           ` John Darrington
2018-08-27 12:54             ` Simon Marchi
2018-08-28 15:35         ` Tom Tromey [this message]
2018-08-23 17:35 ` [PATCH 2/3] GDB: Add support for 24 bit addresses John Darrington
2018-08-24 20:34   ` Simon Marchi
2018-08-25  4:56     ` John Darrington
2018-08-23 17:55 ` [PATCH 1/3] gdb: Added builtin types for 24 bit integers Eli Zaretskii
2018-08-23 19:41 ` Simon Marchi
2018-08-23 20:04   ` John Darrington
2018-08-23 20:35     ` Simon Marchi
2018-08-24  6:11       ` John Darrington
2018-08-24 15:09         ` Simon Marchi
2018-08-24 15:29           ` John Darrington
2018-08-24 20:37             ` Simon Marchi

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=87pny27bcn.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=john@darrington.wattle.id.au \
    --cc=simark@simark.ca \
    /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