public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* mips jmr3904 simulator broken
@ 2022-08-01 19:58 Joel Sherrill
  2022-10-23 17:11 ` [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439] Mike Frysinger
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Sherrill @ 2022-08-01 19:58 UTC (permalink / raw)
  To: Eli Zaretskii via Gdb

Hi

RTEMS has a board support package for the jmr3904 simulator in gdb and it
has broken.   I used git bisect to track down when this broke. This is a
portion of the git bisect log

good  gdb-10.2-release
bad   gdb-11.2-release
...............
git bisect good 162c6aef1f3a96923e75f0b4ef430822d273465c
# good: [07490bf81d2fc91676eb71b77e07f80f20fc1b54] sim: unify various
library testing logic
git bisect good 07490bf81d2fc91676eb71b77e07f80f20fc1b54
# bad: [ce3ec98acd2f344ae911de3f41dd2e3c6c68b141] sim: unify gettext/intl
probing logic
git bisect bad ce3ec98acd2f344ae911de3f41dd2e3c6c68b141
# good: [c30420d82a0b743285cf8333f90ca85274632714] elf: Update
GNU_PROPERTY_UINT32_[AND|OR]_XXX tests
git bisect good c30420d82a0b743285cf8333f90ca85274632714
# bad: [bc56166f66244a9e3abc62c7bc595a6f800f23b0] sim: unify toolchain
dependency logic
git bisect bad bc56166f66244a9e3abc62c7bc595a6f800f23b0

The full bisect log, gdb output and a test executable are at
https://devel.rtems.org/ticket/4689. I was going to file this at the gdb
Bugzilla but am having an issue with my account right now.

Is there a test case for the jmr3904? Or is the RTEMS use case not
accounted for in a current test?

FWIW RTEMS stable tools for development use gdb 11.2 while the unstable are
tracking master.

Thanks.

--joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439]
  2022-08-01 19:58 mips jmr3904 simulator broken Joel Sherrill
@ 2022-10-23 17:11 ` Mike Frysinger
  2023-03-03 21:27   ` Jan-Benedict Glaw
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2022-10-23 17:11 UTC (permalink / raw)
  To: gdb-patches; +Cc: gdb, joel

These configure scripts check $target and change behavior.  They
shouldn't be doing that, but until we can rework the sim to change
behavior based on the input ELF, restore AC_CANONICAL_SYSTEM to
these so that $target is correctly populated.

This was lost in the d3562f83a7b8a1ae6e333cd5561419d3da18fcb4
("sim: unify toolchain probing logic") refactor as the logic was
hoisted up to the common code.  But the fact the vars weren't
passed down to the sub-configure scripts was missed.

Bug: https://sourceware.org/PR29439
---
 sim/mips/configure     | 158 +++++++++++++++++++++++++++++++++++++++++
 sim/mips/configure.ac  |   4 ++
 sim/ppc/configure      | 129 +++++++++++++++++++++++++++++++++
 sim/ppc/configure.ac   |   4 ++
 sim/riscv/configure    | 158 +++++++++++++++++++++++++++++++++++++++++
 sim/riscv/configure.ac |   4 ++
 6 files changed, 457 insertions(+)

diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index 96806424958c..bdc675842d38 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -2,6 +2,10 @@ dnl Process this file with autoconf to produce a configure script.
 AC_INIT(Makefile.in)
 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
+dnl The sim shouldn't be checking $target and changing behavior.  But it is,
+dnl and until we clean that up, we need to expand --target for use below.
+AC_CANONICAL_SYSTEM
+
 # DEPRECATED
 #
 # Instead of defining a `subtarget' macro, code should be checking
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index 75232006e94a..b5909b705719 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -5,6 +5,10 @@ AC_CONFIG_MACRO_DIRS([../.. ../../config])
 AC_PROG_INSTALL
 AC_PROG_CC
 
+dnl The sim shouldn't be checking $target and changing behavior.  But it is,
+dnl and until we clean that up, we need to expand --target for use below.
+AC_CANONICAL_SYSTEM
+
 AC_ARG_ENABLE(sim-bitsize,
 [  --enable-sim-bitsize=n		Specify target bitsize (32 or 64).],
 [case "${enableval}" in
diff --git a/sim/riscv/configure.ac b/sim/riscv/configure.ac
index 6edb28c863ed..0e74a1edda5c 100644
--- a/sim/riscv/configure.ac
+++ b/sim/riscv/configure.ac
@@ -2,6 +2,10 @@ dnl Process this file with autoconf to produce a configure script.
 AC_INIT(Makefile.in)
 AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
+dnl The sim shouldn't be checking $target and changing behavior.  But it is,
+dnl and until we clean that up, we need to expand --target for use below.
+AC_CANONICAL_SYSTEM
+
 # Select the bitsize of the target.
 riscv_addr_bitsize=
 case "${target}" in
-- 
2.37.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439]
  2022-10-23 17:11 ` [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439] Mike Frysinger
@ 2023-03-03 21:27   ` Jan-Benedict Glaw
  2023-10-15 10:37     ` Mike Frysinger
  0 siblings, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2023-03-03 21:27 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: gdb-patches, gdb, joel

[-- Attachment #1: Type: text/plain, Size: 3022 bytes --]

On Sun, 2022-10-23 22:56:47 +0545, Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> wrote:
> These configure scripts check $target and change behavior.  They
> shouldn't be doing that, but until we can rework the sim to change
> behavior based on the input ELF, restore AC_CANONICAL_SYSTEM to
> these so that $target is correctly populated.
> 
> This was lost in the d3562f83a7b8a1ae6e333cd5561419d3da18fcb4
> ("sim: unify toolchain probing logic") refactor as the logic was
> hoisted up to the common code.  But the fact the vars weren't
> passed down to the sub-configure scripts was missed.
> 
> Bug: https://sourceware.org/PR29439

This fix seems to have a side effect:

.../configure --prefix=/tmp/gdb-mipsisa64sb1-elf --target=mipsisa64sb1-elf

make V=1 all-gdb
[...]
[all 2023-03-03 21:07:56] /usr/lib/gcc-snapshot/bin/gcc  -DHAVE_CONFIG_H -DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63 -DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64 -DWITH_HW=1 -DHAVE_DV_SOCKSER -DDEFAULT_INLINE=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -Werror  -I. -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips -I../common -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../common -I../../include -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../../include -I../../bfd -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../../bfd -I../../opcodes -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../../opcodes -I../..  -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../../gnulib/import -I../../gnulib/import -DTARGET_ENABLE_FR=1 -DMIPS_MACH_DEFAULT=bfd_mach_mips_sb1 -g -O2   -c -o semantics.o -MT semantics.o -MMD -MP -MF .deps/semantics.Tpo semantics.c
[all 2023-03-03 21:07:56] sb1.igen: In function 'semantic_PABSDIFC_fmt_MDMX':
[all 2023-03-03 21:07:56] sb1.igen:178:21: error: unknown conversion type character 'v' in format [-Werror=format=]
[all 2023-03-03 21:07:56]   178 |   check_mdmx (SD_, instruction_0);
[all 2023-03-03 21:07:56]       |                     ^~~~~~~~~~~~~~        
[all 2023-03-03 21:07:56] sb1.igen:178:21: error: format '%ld' expects argument of type 'long int', but argument 9 has type 'unsigned int' [-Werror=format=]
[all 2023-03-03 21:07:56]   178 |   check_mdmx (SD_, instruction_0);
[all 2023-03-03 21:07:56]       |                     ^~~~~~~~~~~~~~        
[all 2023-03-03 21:07:56] sb1.igen:178:21: error: too many arguments for format [-Werror=format-extra-args]
[all 2023-03-03 21:08:05] cc1: all warnings being treated as errors

Sorry for taking so long to report it.

MfG, JBG

-- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439]
  2023-03-03 21:27   ` Jan-Benedict Glaw
@ 2023-10-15 10:37     ` Mike Frysinger
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2023-10-15 10:37 UTC (permalink / raw)
  To: Jan-Benedict Glaw; +Cc: gdb-patches, gdb, joel

[-- Attachment #1: Type: text/plain, Size: 3172 bytes --]

On 03 Mar 2023 22:27, Jan-Benedict Glaw wrote:
> On Sun, 2022-10-23 22:56:47 +0545, Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> wrote:
> > These configure scripts check $target and change behavior.  They
> > shouldn't be doing that, but until we can rework the sim to change
> > behavior based on the input ELF, restore AC_CANONICAL_SYSTEM to
> > these so that $target is correctly populated.
> > 
> > This was lost in the d3562f83a7b8a1ae6e333cd5561419d3da18fcb4
> > ("sim: unify toolchain probing logic") refactor as the logic was
> > hoisted up to the common code.  But the fact the vars weren't
> > passed down to the sub-configure scripts was missed.
> > 
> > Bug: https://sourceware.org/PR29439
> 
> This fix seems to have a side effect:
> 
> .../configure --prefix=/tmp/gdb-mipsisa64sb1-elf --target=mipsisa64sb1-elf
> 
> make V=1 all-gdb
> [...]
> [all 2023-03-03 21:07:56] /usr/lib/gcc-snapshot/bin/gcc  -DHAVE_CONFIG_H -DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63 -DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64 -DWITH_HW=1 -DHAVE_DV_SOCKSER -DDEFAULT_INLINE=0 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -Werror  -I. -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips -I../common -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../common -I../../include -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../../include -I../../bfd -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../../bfd -I../../opcodes -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../../opcodes -I../..  -I/var/lib/laminar/run/gdb-mipsisa64sb1-elf/51/binutils-gdb/sim/mips/../../gnulib/import -I../../gnulib/import -DTARGET_ENABLE_FR=1 -DMIPS_MACH_DEFAULT=bfd_mach_mips_sb1 -g -O2   -c -o semantics.o -MT semantics.o -MMD -MP -MF .deps/semantics.Tpo semantics.c
> [all 2023-03-03 21:07:56] sb1.igen: In function 'semantic_PABSDIFC_fmt_MDMX':
> [all 2023-03-03 21:07:56] sb1.igen:178:21: error: unknown conversion type character 'v' in format [-Werror=format=]
> [all 2023-03-03 21:07:56]   178 |   check_mdmx (SD_, instruction_0);
> [all 2023-03-03 21:07:56]       |                     ^~~~~~~~~~~~~~        
> [all 2023-03-03 21:07:56] sb1.igen:178:21: error: format '%ld' expects argument of type 'long int', but argument 9 has type 'unsigned int' [-Werror=format=]
> [all 2023-03-03 21:07:56]   178 |   check_mdmx (SD_, instruction_0);
> [all 2023-03-03 21:07:56]       |                     ^~~~~~~~~~~~~~        
> [all 2023-03-03 21:07:56] sb1.igen:178:21: error: too many arguments for format [-Werror=format-extra-args]
> [all 2023-03-03 21:08:05] cc1: all warnings being treated as errors

i doubt this patch is related to that failure.  seems likely sb1.igen
has always been broken.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-15 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01 19:58 mips jmr3904 simulator broken Joel Sherrill
2022-10-23 17:11 ` [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439] Mike Frysinger
2023-03-03 21:27   ` Jan-Benedict Glaw
2023-10-15 10:37     ` Mike Frysinger

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).