From: Simon Marchi <simark@simark.ca>
To: Nick Clifton <nickc@redhat.com>,
dje@sebabeach.org, andrew.burgess@embecosm.com
Cc: gdb-patches@sourceware.org, law@redhat.com
Subject: Re: RFA: m32r sim: Add prototypes for functions that pass/return DI values
Date: Tue, 10 Nov 2020 13:26:43 -0500 [thread overview]
Message-ID: <682bf449-242f-8200-df3e-44cad1173ab9@simark.ca> (raw)
In-Reply-To: <87ft5hhzwo.fsf@redhat.com>
On 2020-11-10 12:42 p.m., Nick Clifton via Gdb-patches wrote:
> Hi Doug, Hi Andrew,
>
> Jeff Law has tracked down a set of problems with the m32r simulator
> which turned out to be because the m32rbf_h_accum_get_handler()
> function returns a DI value, but it was not prototyped. So callers
> would assume that it returned an int, and happiness ensued...
>
> I am proposing the attached patch as a workaround for the problem. A
> proper fix would be to update the scheme files used to generate the
> cpu headers. But I am not a scheme programmer, and besides getting
> cgen to work with modern versions of guile seems to be quite
> difficult. So instead the patch adds prototypes into one of the m32r
> sim header files that is not auto-generated.
>
> OK to apply ?
>
> Cheers
> Nick
This kind of problem bit us in the past in GDB too. I'd suggest trying
to make the sim build system enable any or all of these warnings to
catch such problems.
-Wmissing-declarations
-Wmissing-prototypes
-Wold-style-declaration
-Wold-style-definition
-Wstrict-prototypes
Simon
next prev parent reply other threads:[~2020-11-10 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 17:42 Nick Clifton via Gdb-patches
2020-11-10 18:26 ` Simon Marchi [this message]
2020-11-11 15:33 ` Nick Clifton via Gdb-patches
2021-01-13 4:35 ` Mike Frysinger via Gdb-patches
2020-11-11 21:13 ` 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=682bf449-242f-8200-df3e-44cad1173ab9@simark.ca \
--to=simark@simark.ca \
--cc=andrew.burgess@embecosm.com \
--cc=dje@sebabeach.org \
--cc=gdb-patches@sourceware.org \
--cc=law@redhat.com \
--cc=nickc@redhat.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