From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C2AEF3855016; Mon, 5 Jul 2021 16:04:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2AEF3855016 From: "Samuel.r.warner at me dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/26912] "file" command causes core dump while specifying the executable on the command line does not Date: Mon, 05 Jul 2021 16:04:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Samuel.r.warner at me dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Mon, 05 Jul 2021 16:04:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26912 --- Comment #17 from Sam Warner --- Hi, On rare occasions I am encountering the following "internal-error: int filter_overlapping_sections=E2=80=9D. I suspect it has more to do with my t= echnique for debugging gdb than an issue with the patch. Still running test suites, Should we wait before marking the bug fixed? Sam sam@gdbdev--1- gdb % /Users/sam/Documents/gdb-10.2/gdb/gdb --data-directory=3D/Users/sam/Documents/gdb-10.2/gdb/data-directory /Users/sam/Documents/gdb-10.2/gdb/gdb GNU gdb (GDB) 10.2 Copyright (C) 2021 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 "x86_64-apple-darwin20.5.0". 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 /Users/sam/Documents/gdb-10.2/gdb/gdb... Setting up the environment for debugging gdb. During symbol reading: unsupported tag: 'DW_TAG_unspecified_type' During symbol reading: cannot get low and high bounds for subprogram DIE at 0xa78 During symbol reading: unexpected demangled name 'allocator >' During symbol reading: unexpected overlap between: (A) section `.cstring' from `/Users/sam/Documents/gdb-10.2/gdb/xml-builtin= .o' [0x0, 0x9e) (B) section `*ABS*' from `/Users/sam/Documents/gdb-10.2/gdb/xml-builtin.o' [0x0, 0x0). Will ignore section B objfiles.c:1111: internal-error: int filter_overlapping_sections(struct obj_section **, int): Assertion `sect1_addr <=3D sect2_addr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) [answered Y; input not from terminal] This is a bug, please report it. For instructions, see: . objfiles.c:1111: internal-error: int filter_overlapping_sections(struct obj_sect--Typ--Typ--T--Typ--Ty--Typ-----Ty--T------------Typ------Ty----T--= -------T-------Type for more, q to quit, c to continue without paging--c ion **, int): Assertion `sect1_addr <=3D sect2_addr' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) [answered Y; input not from terminal] zsh: abort /Users/sam/Documents/gdb-10.2/gdb/gdb=20 /Users/sam/Documents/gdb-10.2/gdb/gdb sam@gdbdev--1- gdb % /Users/sam/Documents/gdb-10.2/gdb/gdb --data-directory=3D/Users/sam/Documents/gdb-10.2/gdb/data-directory /Users/sam/Documents/gdb-10.2/gdb/gdb > On Jul 3, 2021, at 11:35 AM, Sam Warner wrote: >=20 > Success - null-pointer gone when using =E2=80=98-file=E2=80=99 command. >=20=20=20 > I hand edited solid-darwin.c, and used the following: >=20 > // > // from Simon Marchi, put in here by Sam Warner as couldn't find the pa= tch > // > /* Everything below only makes sense if we have a running inferior. */ > if (!target_has_execution_current() ) > return; >=20 > I used target_has_execution_current() to get around some header file issu= e where target_has_execution wasn=E2=80=99t being defined in my environment= . I=E2=80=99ll go research that next. After solving the header so I use t= he exact changes Simon had, then I=E2=80=99ll run the test-suite. >=20 > Thank you Simon, >=20 >=20 > Sam >=20 > =E2=80=A6. edited from command shell =E2=80=A6 (make it easier to read) > sam@gdbdev--1- gdb-10.2 % gdb --data-directory=3D/Users/sam/Documents/gdb= -10.2/gdb/data-directory gdb > GNU gdb (GDB) 10.2 > Copyright (C) 2021 Free Software Foundation, Inc. > (top-gdb) run -q > (gdb) file /Users/sam/Documents/gdb-10.2/gdb/gdb > Reading symbols from /Users/sam/Documents/gdb-10.2/gdb/gdb... > (top-gdb)=20 >=20 >=20 >=20 >=20 >> On Jul 3, 2021, at 10:25 AM, Sam Warner > wrote: >>=20 >> Hi Simon, >> I=E2=80=99ve been unable to find this patch on https://sourceware.org= /git/gitweb.cgi?p=3Dbinutils-gdb.git I tried searching based on Change-ID, and other it= ems listed within the thread, and even your name. Can you point me to the = patch? >>=20 >> You do show the source changes you made. I will go make the source c= hanges to solid-darwin.c and test. If you can point me to the patch that= =E2=80=99d be great. >>=20 >> Sam >>=20 >>> On Jul 2, 2021, at 3:51 PM, simark at simark dot ca > wrote: >>>=20 >>> https://sourceware.org/bugzilla/show_bug.cgi?id=3D26912 >>>=20 >>> --- Comment #11 from Simon Marchi --- >>> (In reply to Sam Warner from comment #9) >>>> Can I change the bug to Confirmed and assign myself (WIP on using Simo= n's >>>> source modifications (simark), and if not resolved by these continue to >>>> investigate-resolve)? >>>=20 >>> Here's the patch in question: >>>=20 >>> https://sourceware.org/pipermail/gdb-patches/2021-June/180396.html >>>=20 >>> Can you just verify if this fixes the problem for you? If so I'll comm= it it to >>> the master branch. >>>=20 >>> --=20 >>> You are receiving this mail because: >>> You are on the CC list for the bug. >>=20 > --=20 You are receiving this mail because: You are on the CC list for the bug.=