From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EAF083857BBA; Tue, 2 Aug 2022 21:03:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EAF083857BBA From: "joel.sherrill at oarcorp dot com" To: gdb-prs@sourceware.org Subject: [Bug sim/29439] New: mips simulator (jmr3904) unable to run executables Date: Tue, 02 Aug 2022 21:03:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: sim X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joel.sherrill at oarcorp dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 21:03:28 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29439 Bug ID: 29439 Summary: mips simulator (jmr3904) unable to run executables Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: sim Assignee: unassigned at sourceware dot org Reporter: joel.sherrill at oarcorp dot com CC: vapier at gentoo dot org Target Milestone: --- Created attachment 14251 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14251&action=3Ded= it RTEMS hello.exe to reproduce the issue This is from RTEMS and the executable in question is hello.exe (attached). = This same executable works with gdb 10.2 but fails with 11.2 and later. There is= an objdump, git bisect, and attached executable to reproduce this.=20 When investigating remember the --board=3Djmr3904 argument to "tar sim" or = the run command.=20 We are tracking it as: https://devel.rtems.org/ticket/4689 This looks like a GDB or other tool issue. Maybe a sign extension bug: $ objdump -h build/mips/jmr3904/testsuites/samples/ticker.exe build/mips/jmr3904/testsuites/samples/ticker.exe: file format elf32-tradbigmips Sections: Idx Name Size VMA LMA File off Algn 0 .text 000115a0 88000000 88000000 00001000 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .rtemsroset 00000070 880115a0 880115a0 000125a0 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .init 00000048 88011610 88011610 00012610 2**0 CONTENTS, ALLOC, LOAD, READONLY, CODE 3 .fini 00000030 88011658 88011658 00012658 2**0 CONTENTS, ALLOC, LOAD, READONLY, CODE 4 .ctors 00000008 88011688 88011688 00012688 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .dtors 00000008 88011690 88011690 00012690 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .rdata 00002030 880116a0 880116a0 000126a0 2**4 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .MIPS.abiflags 00000018 880136d0 880136d0 000146d0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA, LINK_ONCE_SAME_SIZE 8 .data 000005c0 880136e8 880136e8 000146e8 2**3 CONTENTS, ALLOC, LOAD, DATA 9 .bss 00001410 88013cb0 88013cb0 00014ca8 2**4 ALLOC 10 .noinit 00001310 880150c0 880150c0 00014ca8 2**3 ALLOC 11 .rtemsstack 00004000 880163d0 880163d0 00014ca8 2**4 ALLOC 12 .debug_aranges 00002958 00000000 00000000 00014ca8 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 13 .debug_info 00109cb1 00000000 00000000 00017600 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_abbrev 00023397 00000000 00000000 001212b1 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_line 0003dc56 00000000 00000000 00144648 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_frame 000048f4 00000000 00000000 001822a0 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_str 0001160c 00000000 00000000 00186b94 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .gnu.attributes 00000010 00000000 00000000 001981a0 2**0 CONTENTS, READONLY 19 .comment 00000063 00000000 00000000 001981b0 2**0 CONTENTS, READONLY 20 .debug_line_str 000001be 00000000 00000000 00198213 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 21 .debug_loclists 00022d89 00000000 00000000 001983d1 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 22 .debug_rnglists 0000605d 00000000 00000000 001bb15a 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS ~/src/rtems (master) > /opt/rtems/6/bin/mipstx39-rtems6-gdb build/mips/jmr3904/testsuites/samples/ticker.exe=20 GNU gdb (GDB) 11.2 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=3Dx86_64-linux-gnu --target=3Dmipstx39-r= tems6". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from build/mips/jmr3904/testsuites/samples/ticker.exe... (gdb) tar sim Connected to the simulator. (gdb) load Loading section .text, size 0x115a0 lma ffffffff88000000 Loading section .rtemsroset, size 0x70 lma ffffffff880115a0 Loading section .init, size 0x48 lma ffffffff88011610 Loading section .fini, size 0x30 lma ffffffff88011658 Loading section .ctors, size 0x8 lma ffffffff88011688 Loading section .dtors, size 0x8 lma ffffffff88011690 Loading section .rdata, size 0x2030 lma ffffffff880116a0 Loading section .MIPS.abiflags, size 0x18 lma ffffffff880136d0 Loading section .data, size 0x5c0 lma ffffffff880136e8 Start address ffffffff88000004 Transfer rate: 648448 bits in <1 sec. (gdb) r Starting program: /tmp/sh/b-rtems/mips/jmr3904/testsuites/samples/ticker.ex= e=20 mips-core: 4 byte read to unmapped address 0xffffffff88000004 at 0xffffffff88000004 Program received signal SIGBUS, Bus error. _start () at /home/EB/sebastian_h/src/rtems/bsps/mips/jmr3904/start/start.S= :57 57 bal $LF1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I did a git bisect after narrowing down which release branches it worked on. That let me track it down to a commit based on git bisect. Here is that information: $ git bisect log git bisect start # good: [ce35d7163e779b1321058b22f005c70ce1524b25] Set GDB version number to 10.2. git bisect good ce35d7163e779b1321058b22f005c70ce1524b25 # bad: [ef6ec3333e80e39ce207c6c5d5628bdd5402111d] Set GDB version number to 11.2. git bisect bad ef6ec3333e80e39ce207c6c5d5628bdd5402111d # good: [8087c3fa8b5d695e3e29e69d70d0b35ec902ac59] Fix GDB build in infrun.c when configured with unit tests disabled git bisect good 8087c3fa8b5d695e3e29e69d70d0b35ec902ac59 # skip: [d3dacd0fafba473fd42fdf3ca86fd3203db28ae8] Automatic date update in version.in git bisect skip d3dacd0fafba473fd42fdf3ca86fd3203db28ae8 # skip: [40d07d07d051308626f6079fa6d1598fafb445c7] Change exp_uses_objfile = to return bool git bisect skip 40d07d07d051308626f6079fa6d1598fafb445c7 # good: [a4eba6087d4cec81f8b41477b4da56ff87b88e91] Fix a bug in the s390x linker when discarding all inpuit files. git bisect good a4eba6087d4cec81f8b41477b4da56ff87b88e91 # good: [546b77fe78bb366bbec3c708ac371e2f553bbdae] GDBserver remote packet support for memory tagging git bisect good 546b77fe78bb366bbec3c708ac371e2f553bbdae # good: [2e8adb6448c78fdb748c13c7859b68f3e7984c4d] Update config.sub and config.guess for MIPS R3 and R5 ISA support git bisect good 2e8adb6448c78fdb748c13c7859b68f3e7984c4d # bad: [50a6759f0f541ea965c7330bfbfe335cb8d66af8] Use gdb::function_view in addrmap_foreach git bisect bad 50a6759f0f541ea965c7330bfbfe335cb8d66af8 # good: [c572c4580e774f1ec0115948d31dcf8a5b04878e] Automatic date update in version.in git bisect good c572c4580e774f1ec0115948d31dcf8a5b04878e # good: [209f108f73888741bf31d03d35722b6e0b521ec8] sim: mn10300: tweak stat= ic inlines git bisect good 209f108f73888741bf31d03d35722b6e0b521ec8 # bad: [57a922a59801a9e7684f9661a65fa2ed5833d65d] sim: move UNUSED before T= YPE in SIM_ENDIAN_INLINE's definition git bisect bad 57a922a59801a9e7684f9661a65fa2ed5833d65d # good: [162c6aef1f3a96923e75f0b4ef430822d273465c] gas: fold symbol table entries generated for .startof.() / .sizeof.() git bisect good 162c6aef1f3a96923e75f0b4ef430822d273465c # good: [07490bf81d2fc91676eb71b77e07f80f20fc1b54] sim: unify various libra= ry 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 You are receiving this mail because: You are on the CC list for the bug.=