This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Buggdb/13333] In some caseïwhen remote target is disconnecttedïbut GDB try to delete breakpoints by send z0 packet, it will cause GDB crash
- From: "ggs334 at 163 dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 23 Oct 2011 08:55:47 +0000
- Subject: [Buggdb/13333] In some caseïwhen remote target is disconnecttedïbut GDB try to delete breakpoints by send z0 packet, it will cause GDB crash
- Auto-submitted: auto-generated
- References: <bug-13333-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13333
gaohusheng <ggs334 at 163 dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |X86-linux
Host| |X86-linux
Target Milestone|--- |7.1
Summary|In some caseïwhen remote |In some caseïwhen remote
|target is disconnecttedïbut |target is disconnecttedïbut
|GDB |GDB try to delete
| |breakpoints by send z0
| |packet, it will cause GDB
| |crash
--- Comment #1 from gaohusheng <ggs334 at 163 dot com> 2011-10-23 08:55:47 UTC ---
In some caseïwhen remote target is disconnecttedïbut GDB try to delete
breakpoints by send z0 packet, it will cause GDB crash
===========my test case================
<stdio.h>
int main()
{
int j=0;
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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>.
(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)...done.
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=0;
(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.
...........................
==============I have omit some packet information=========
...........................
Sending packet: $vCont;c#a8...Packet received: W00
=================why this happen? ==================
[Inferior 1 (Remote target) exited normally]
Sending packet: $z0,529bd0,1#c9...Segmentation fault (core dumped)
=================why this happen? ==================
[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...Segmentation
fa ult (core dumped)
Badly placed ()'s.
==============GDB server===============
GDBserver:
[guosheng_gao@rslpc1 nat-7.3]$ bin/gdbserver :1234 ~/test/gao2
Process /home/guosheng_gao/test/gao2 created; pid = 3182
Listening on port 1234
Remote debugging from host 127.0.0.1
Child exited with status 0
GDBserver exiting
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.