From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31671 invoked by alias); 13 Nov 2009 01:09:46 -0000 Received: (qmail 31663 invoked by uid 22791); 13 Nov 2009 01:09:45 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Nov 2009 01:09:41 +0000 Received: from spaceape10.eur.corp.google.com (spaceape10.eur.corp.google.com [172.28.16.144]) by smtp-out.google.com with ESMTP id nAD19bj5018636 for ; Fri, 13 Nov 2009 01:09:37 GMT Received: from pwi12 (pwi12.prod.google.com [10.241.219.12]) by spaceape10.eur.corp.google.com with ESMTP id nAD193Yr020008 for ; Thu, 12 Nov 2009 17:09:35 -0800 Received: by pwi12 with SMTP id 12so1792526pwi.22 for ; Thu, 12 Nov 2009 17:09:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.9.6 with SMTP id 6mr734907wai.35.1258074574967; Thu, 12 Nov 2009 17:09:34 -0800 (PST) In-Reply-To: <200910191106.28905.pedro@codesourcery.com> References: <200910191106.28905.pedro@codesourcery.com> Date: Fri, 13 Nov 2009 01:09:00 -0000 Message-ID: <8ac60eac0911121709r3220d941y9bca3138b76c9a13@mail.gmail.com> Subject: Re: [commit] multi-executable support From: Paul Pluzhnikov To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00295.txt.bz2 On Mon, Oct 19, 2009 at 2:06 AM, Pedro Alves wrote: > 2009-10-19 =A0Pedro Alves =A0 > =A0 =A0 =A0 =A0 =A0 =A0Stan Shebs =A0 > > =A0 =A0 =A0 =A0Add base multi-executable/process support to GDB. This appears to be triggering an assert for me: struct Foo { Foo(); Foo(const char *); const char *bar(); const char *x; }; Foo::Foo(const char *y) { x =3D y; } Foo::Foo() { x =3D "Hello"; } const char * Foo::bar() { return x; } int main() { int x =3D 1; Foo f("abc"); const char *s =3D f.bar(); } g++ -g foo.cc && gdb-cvs ./a.out GNU gdb (GDB) 7.0.50.20091113-cvs ... This GDB was configured as "x86_64-unknown-linux-gnu". Reading symbols from /usr/local/google/tmp/b1844402/a.out...done. (gdb) b Foo::Foo ../../src/gdb/breakpoint.c:4789: internal-error: set_raw_breakpoint: Assertion `sal.pspace !=3D NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Aborted (core dumped) The crash is here: #0 0x00007f72aeaee095 in raise () from /lib/libc.so.6 #1 0x00007f72aeaefaf0 in abort () from /lib/libc.so.6 #2 0x0000000000460c25 in internal_vproblem (problem=3D0xab3e90, file=3D0x731a26 "../../src/gdb/breakpoint.c", line=3D4789, fmt=3D0x7319f2 "%s: Assertion `%s' failed.", ap=3D0x7fffb7c81ae0) at ../../src/gdb/utils.c:969 #3 0x0000000000460c82 in internal_verror (file=3D0x731a26 "../../src/gdb/breakpoint.c", line=3D4789, fmt=3D0x7319f2 "%s: Assertion `%s' failed.", ap=3D0x7fffb7c81ae0) at ../../src/gdb/utils.c:994 #4 0x0000000000460d74 in internal_error (file=3D0x731a26 "../../src/gdb/breakpoint.c", line=3D4789, string=3D0x7319f2 "%s: Assertion `%s' failed.") at ../../src/gdb/utils.c:1003 #5 0x00000000004f0623 in set_raw_breakpoint (gdbarch=3D0xc0e040, sal=3D..., bptype=3Dbp_breakpoint) at ../../src/gdb/breakpoint.c:4789 #6 0x00000000004f3126 in create_breakpoint (gdbarch=3D0xc0e040, sals=3D..., addr_string=3D0xbffd70 "Foo", cond_string=3D0x0, type=3Dbp_breakpoint, disposition=3Ddisp_donttouch, thread=3D-1, task=3D0, ignore_count=3D0, ops=3D0x0, from_tty=3D0, enabled=3D1) at ../../src/gdb/breakpoint.c:6098 #7 0x00000000004f39f7 in create_breakpoints (gdbarch=3D0xc0e040, sals=3D..., addr_string=3D0xbe9390, cond_string=3D0x0, type=3Dbp_breakpoint, disposition=3Ddisp_donttouch, thread=3D-1, task=3D0, ignore_count=3D0, ops=3D0x0, from_tty=3D0, enabled=3D1) at ../../src/gdb/breakpoint.c:6333 #8 0x00000000004f4439 in break_command_really (gdbarch=3D0xc0e040, arg=3D0xae494a "", cond_string=3D0x0, thread=3D-1, parse_condition_and_thread=3D1, tempflag=3D0, hardwareflag=3D0, traceflag= =3D0, ignore_count=3D0, pending_break_support=3DAUTO_BOOLEAN_AUTO, ops=3D0x0, from_tty=3D0, enabled=3D1) at ../../src/gdb/breakpoint.c:6663 #9 0x00000000004f4635 in break_command_1 (arg=3D0xae4942 "Foo::Foo", flag=3D0, from_tty=3D0) at ../../src/gdb/breakpoint.c:6721 #10 0x00000000004f4912 in break_command (arg=3D0xae4942 "Foo::Foo", from_tty=3D0) at ../../src/gdb/breakpoint.c:6846 The 'sal' in frame 5 looks bogus: (gdb) p sal $1 =3D {pspace =3D 0x0, symtab =3D 0x0, section =3D 0x0, line =3D 0, pc =3D= 0, end =3D 0, explicit_pc =3D 0, explicit_line =3D 0} The official 7.0 release does something unreasonable as well: Reading symbols from /usr/local/google/tmp/b1844402/a.out...done. (gdb) b Foo::Foo Breakpoint 1 at 0x0 Note: breakpoint 1 also set at pc 0x0. Breakpoint 2 at 0x0 warning: Multiple breakpoints were set. Use the "delete" command to delete unwanted breakpoints. (gdb) but didn't assert. --=20 Paul Pluzhnikov