From: Nicholas Clifton <nickc@redhat.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: AArch64 sim
Date: Fri, 17 Jul 2015 14:10:00 -0000 [thread overview]
Message-ID: <55A90CBA.40007@redhat.com> (raw)
In-Reply-To: <20150716151902.GE5641@vapier>
[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]
Hi Mike,
Thanks for the further review. I am attaching a third version of the
patch with all of the issues you raised fixed, except for two...
>> +++ include/gdb/sim-aarch64.h
>> +#ifdef __cplusplus
>> +extern "C" { // }
>> +#endif
>
> hmm, i see a few arches do this, but most don't. is there any reason we should
> keep this ? or should we scrub all targets to not do this ?
It is your call. I saw that other header files in this directory were
doing it, so I thought that it would be wise to follow their example.
The extra code does not hurt when compiling with C and I presume that it
is necessary when compiling with C++. (I do not know this for sure
though - I hate C++). I am happy to remove the code if you want however.
>> +typedef enum
>> +{
>> + STATUS_READY = 0, /* May continue stepping or running. */
>> + STATUS_RETURN = 1, /* Via normal return from initial frame. */
>> + STATUS_HALT = 2, /* Via HALT pseudo-instruction. */
>> + STATUS_BREAK = 3, /* Via BRK instruction. */
>> + STATUS_CALLOUT = 4, /* Via CALLOUT pseudo-instruction. */
>> + STATUS_ERROR = 5, /* Simulator detected problem. */
>> + STATUS_MAX = 6
>> +} StatusCode;
>
> a scan of the code indicates that most of this looks like you're setting state
> and then acting on it later yourself when you really should be calling
> sim_engine_halt directly. any reason for doing it this way ?
Originally it was simply historical - this is the way the code was
written in the smallaarch64sim. Now it is because it allows better
tracing and disassembler output, and cleaner code - the halt and error
returns are only handled in one place.
Is this version OK to apply ?
Cheers
Nick
[-- Attachment #2: aarch64.sim.patch.3.xz --]
[-- Type: application/x-xz, Size: 51300 bytes --]
next prev parent reply other threads:[~2015-07-17 14:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-28 12:25 Nick Clifton
2015-07-02 9:17 ` Andre Vieira
2015-07-02 13:53 ` Nicholas Clifton
2015-07-02 14:43 ` Andre Vieira
[not found] ` <55954DEE.50609@arm.com>
2015-07-02 15:20 ` Nicholas Clifton
2015-07-07 17:12 ` Mike Frysinger
2015-07-15 16:58 ` Nick Clifton
2015-07-16 15:19 ` Mike Frysinger
2015-07-17 14:10 ` Nicholas Clifton [this message]
2015-11-10 7:32 ` Mike Frysinger
2015-11-19 14:51 ` Nick Clifton
2015-11-20 9:13 ` Mike Frysinger
2015-11-20 10:56 ` Nick Clifton
2015-11-20 19:28 ` Mike Frysinger
2015-11-24 8:50 ` Nick Clifton
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=55A90CBA.40007@redhat.com \
--to=nickc@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=vapier@gentoo.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).