From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: add gdbarch_stack_grows_down function
Date: Thu, 09 May 2024 13:43:27 -0600 [thread overview]
Message-ID: <874jb63h5s.fsf@tromey.com> (raw)
In-Reply-To: <e892c05f4a97f54914158e71a57b51d912e490cf.1715266700.git.aburgess@redhat.com> (Andrew Burgess's message of "Thu, 9 May 2024 15:59:04 +0100")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> I propose adding a new function `gdbarch_stack_grows_down`. This is
Andrew> not going to be a gdbarch method that can be overridden, instead, this
Andrew> will just call the gdbarch_inner_than function. We already have some
Andrew> gdbarch methods like this, checkout arch-utils.c for examples.
This makes sense to me.
Andrew> + /* The current assumption is that stacks either grow down, or they grow
Andrew> + up, so one of these checks should be true. */
Andrew> + gdb_assert (gdbarch_inner_than (arch, 1, 2)
Andrew> + || gdbarch_inner_than (arch, 2, 1));
I wonder if this would be better as a new all-arch self-test in
gdbarch-selftests.c.
Tom
next prev parent reply other threads:[~2024-05-09 19:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 14:59 Andrew Burgess
2024-05-09 19:43 ` Tom Tromey [this message]
2024-05-10 8:54 ` Andrew Burgess
2024-05-10 9:43 ` Tom Tromey
2024-05-10 13:31 ` Andrew Burgess
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=874jb63h5s.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).