From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10659 invoked by alias); 25 Oct 2011 02:27:16 -0000 Received: (qmail 10632 invoked by uid 22791); 25 Oct 2011 02:27:15 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,SARE_HEAD_8BIT_SPAM,SARE_SUB_ENC_UTF8 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Oct 2011 02:27:02 +0000 From: "ggs334 at 163 dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/13333]=?UTF-8?Q?=20In=20some=20case=EF=BC=8Cwhen=20remote=20target=20is=20disconnectted=EF=BC=8Cbut=20GDB=20try=20to=20delete=20breakpoints=20by=20send=20z0=20packet?=, it will cause GDB crash Date: Tue, 25 Oct 2011 02:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ggs334 at 163 dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 7.1 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2011-q4/txt/msg00122.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=3D13333 --- Comment #2 from gaohusheng 2011-10-25 02:25:43 = UTC --- (In reply to comment #0) >=20 In some case=EF=BC=8Cwhen remote target is disconnectted=EF=BC=8Cbut GDB tr= y to delete breakpoints by send z0 packet, it will cause GDB crash =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dmy test case=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D int main() { int j=3D0; j++; j++; j++; j++; j++; j++; j++; j++; return 0; } I test this case on: host: x86-linux GDB; target x86-linux GDBserver; [guosheng_gao@rslpc1 nat-7.3]$ bin/gdb GNU gdb (GDB) 7.3.1 Copyright (C) 2011 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 "i686-pc-linux-gnu". For bug reporting instructions, please see: . (gdb) file ~/test/gao2 Reading symbols from /home/guosheng_gao/test/gao2...done. (gdb) b main Breakpoint 1 at 0x8048340: file gao2.c, line 4. (gdb) target remote :1234 Remote debugging using :1234 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...do= ne. Loaded symbols for /lib/ld-linux.so.2 0x005197c0 in _start () from /lib/ld-linux.so.2 (gdb) c Continuing. Breakpoint 1, main () at gao2.c:4 4 int j=3D0; (gdb) n 5 j++; (gdb) 6 j++; (gdb) 7 j++; (gdb) 8 j++; (gdb) 9 j++; (gdb) 10 j++; (gdb) 11 j++; (gdb) 12 j++; (gdb) 13 return 0; (gdb) set debug remote 1 (gdb) n (gdb) n 14 } (gdb) n (gdb) n Single stepping until exit from function __libc_start_main, which has no line number information. ........................... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DI have omit some packet informati= on=3D=3D=3D=3D=3D=3D=3D=3D=3D ........................... Sending packet: $vCont;c#a8...Packet received: W00 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dwhy this happen? =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [Inferior 1 (Remote target) exited normally] Sending packet: $z0,529bd0,1#c9...Segmentation fault (core dumped) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dwhy this happen? =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [guosheng_gao@rslpc1 nat-7.3]$ [guosheng_gao@rslpc1 nat-7.3]$ [Inferior 1 (Remote target) exited normally] Badly placed ()'s. [guosheng_gao@rslpc1 nat-7.3]$ Sending packet: $z0,529bd0,1#c9...Segmentati= on fa ult (core dumped) Badly placed ()'s. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DGDB server=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D GDBserver: [guosheng_gao@rslpc1 nat-7.3]$ bin/gdbserver :1234 ~/test/gao2 Process /home/guosheng_gao/test/gao2 created; pid =3D 3182 Listening on port 1234 Remote debugging from host 127.0.0.1 Child exited with status 0 GDBserver exiting --=20 Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=3Demail ------- You are receiving this mail because: ------- You are on the CC list for the bug.