public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c
@ 2020-08-10 15:49 vries at gcc dot gnu.org
2020-08-10 16:15 ` [Bug build/26365] " vries at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-10 15:49 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
Bug ID: 26365
Summary: [build, arm-elf] Compilation error in
sim/arm/wrapper.c
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
gdb/gdb_mbuild.sh -e arm-elf fails here:
...
src/sim/arm/wrapper.c: In function 'sim_open':
src/sim/arm/wrapper.c:839:31: error: passing argument 1 of
'sim_target_parse_arg_array' discards 'const' qualifier from pointer target
type [-Werror=discarded-qualifiers]
sim_target_parse_arg_array (argv);
^~~~
src/sim/arm/wrapper.c:744:1: note: expected 'char **' but argument is of type
'char * const*'
sim_target_parse_arg_array (char ** argv)
^~~~~~~~~~~~~~~~~~~~~~~~~~
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug build/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
@ 2020-08-10 16:15 ` vries at gcc dot gnu.org
2020-08-10 22:02 ` vries at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-10 16:15 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
So we have argv:
...
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
host_callback *cb,
struct bfd *abfd,
char * const *argv)
{
...
and then argv is used in this call:
...
sim_target_parse_arg_array (argv);
...
with prototype:
...
sim_target_parse_arg_array (char ** argv)
...
Looking down further in the implementation in sim_target_parse_command_line:
...
/* Remove this option from the argv array. */
for (arg = i; arg < argc; arg ++)
argv[arg] = argv[arg + 1];
...
we seem to modifying argv.
OTOH, the sim_open def matches the decl in include/gdb/remote-sim.h:
...
SIM_DESC sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *callback,
struct bfd *abfd, char * const *argv);
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug build/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
2020-08-10 16:15 ` [Bug build/26365] " vries at gcc dot gnu.org
@ 2020-08-10 22:02 ` vries at gcc dot gnu.org
2020-08-11 7:55 ` alahay01 at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: vries at gcc dot gnu.org @ 2020-08-10 22:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alahay01 at gcc dot gnu.org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug build/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
2020-08-10 16:15 ` [Bug build/26365] " vries at gcc dot gnu.org
2020-08-10 22:02 ` vries at gcc dot gnu.org
@ 2020-08-11 7:55 ` alahay01 at gcc dot gnu.org
2020-08-11 12:10 ` luis.machado at linaro dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: alahay01 at gcc dot gnu.org @ 2020-08-11 7:55 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
Alan Hayward <alahay01 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |luis.machado at linaro dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug build/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
` (2 preceding siblings ...)
2020-08-11 7:55 ` alahay01 at gcc dot gnu.org
@ 2020-08-11 12:10 ` luis.machado at linaro dot org
2020-08-11 12:10 ` luis.machado at linaro dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2020-08-11 12:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #2 from Luis Machado <luis.machado at linaro dot org> ---
I recall having fixed this, but then running into the ugliness of sim code.
I'll investigate it again... but the GDB simulators are not well maintained.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug build/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
` (3 preceding siblings ...)
2020-08-11 12:10 ` luis.machado at linaro dot org
@ 2020-08-11 12:10 ` luis.machado at linaro dot org
2020-08-11 12:10 ` luis.machado at linaro dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2020-08-11 12:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |luis.machado at linaro dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug build/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
` (4 preceding siblings ...)
2020-08-11 12:10 ` luis.machado at linaro dot org
@ 2020-08-11 12:10 ` luis.machado at linaro dot org
2020-08-11 12:10 ` luis.machado at linaro dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2020-08-11 12:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
--- Comment #3 from Luis Machado <luis.machado at linaro dot org> ---
Correction, the GDB ARM/AArch64 simulators.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug build/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
` (5 preceding siblings ...)
2020-08-11 12:10 ` luis.machado at linaro dot org
@ 2020-08-11 12:10 ` luis.machado at linaro dot org
2020-08-11 13:26 ` luis.machado at linaro dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2020-08-11 12:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |arm-elf
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug build/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
` (6 preceding siblings ...)
2020-08-11 12:10 ` luis.machado at linaro dot org
@ 2020-08-11 13:26 ` luis.machado at linaro dot org
2020-08-11 18:47 ` [Bug sim/26365] " luis.machado at linaro dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2020-08-11 13:26 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
--- Comment #4 from Luis Machado <luis.machado at linaro dot org> ---
The most obvious ugly thing to do is to force-cast the argv argument.
Something less ugly would be to copy argv over and then operate on that
instead.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
` (7 preceding siblings ...)
2020-08-11 13:26 ` luis.machado at linaro dot org
@ 2020-08-11 18:47 ` luis.machado at linaro dot org
2020-08-13 13:33 ` cvs-commit at gcc dot gnu.org
2020-08-13 13:33 ` luis.machado at linaro dot org
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2020-08-11 18:47 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vapier at gentoo dot org
Component|build |sim
--- Comment #5 from Luis Machado <luis.machado at linaro dot org> ---
Patch sent.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
` (8 preceding siblings ...)
2020-08-11 18:47 ` [Bug sim/26365] " luis.machado at linaro dot org
@ 2020-08-13 13:33 ` cvs-commit at gcc dot gnu.org
2020-08-13 13:33 ` luis.machado at linaro dot org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-13 13:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Luis Machado <luisgpm@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a5353ae6cf1716c0ff6f7037dc3c336f0d99ecc1
commit a5353ae6cf1716c0ff6f7037dc3c336f0d99ecc1
Author: Luis Machado <luis.machado@linaro.org>
Date: Thu Aug 13 10:32:52 2020 -0300
[ARM, sim] Fix build failure with -Werror (PR26365)
There is a bit of a situation in the ARM sim with regards to the handling
of argv. sim_open () gets a const char **argv, but ARM's sim_open gets
clever and decides to modify argv in place via
sim_target_parse_command_line.
I'm not sure why.
In any case, here's a fix that makes the code modify a copy of argv
instead.
sim/arm/ChangeLog:
2020-08-13 Luis Machado <luis.machado@linaro.org>
PR sim/26365
* wrapper.c (sim_target_parse_command_line): Free discarded argv
entries.
(sim_open): Use a duplicate of argv instead of the original argv.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/26365] [build, arm-elf] Compilation error in sim/arm/wrapper.c
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
` (9 preceding siblings ...)
2020-08-13 13:33 ` cvs-commit at gcc dot gnu.org
@ 2020-08-13 13:33 ` luis.machado at linaro dot org
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2020-08-13 13:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26365
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Luis Machado <luis.machado at linaro dot org> ---
Fixed now.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-08-13 13:34 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 15:49 [Bug build/26365] New: [build, arm-elf] Compilation error in sim/arm/wrapper.c vries at gcc dot gnu.org
2020-08-10 16:15 ` [Bug build/26365] " vries at gcc dot gnu.org
2020-08-10 22:02 ` vries at gcc dot gnu.org
2020-08-11 7:55 ` alahay01 at gcc dot gnu.org
2020-08-11 12:10 ` luis.machado at linaro dot org
2020-08-11 12:10 ` luis.machado at linaro dot org
2020-08-11 12:10 ` luis.machado at linaro dot org
2020-08-11 12:10 ` luis.machado at linaro dot org
2020-08-11 13:26 ` luis.machado at linaro dot org
2020-08-11 18:47 ` [Bug sim/26365] " luis.machado at linaro dot org
2020-08-13 13:33 ` cvs-commit at gcc dot gnu.org
2020-08-13 13:33 ` luis.machado at linaro dot org
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).