I have done same test on ubuntu "gnu gdb 6.8-debian", and enabled "set debug
remote 1" option..

Observed that, After saying continue command, Looks like while switching to
new thread, gdb unable to remove the breakpoints from current thread.


Test log:
===================================================================================================
r...@sri-desktop:/opt/GIT/KGDB-Git/linux-2.6-kgdb# gdb vmlinux
GNU gdb 6.8-debian
Copyright (C) 2008 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 "i486-linux-gnu"...

(gdb) set debug remote 1

(gdb) target remote udp:10.161.2.225:6443

warning: The remote protocol may be unreliable over
UDP.
Some events may be lost, rendering further debugging
impossible.
Remote debugging using udp:10.161.2.225:6443

Sending packet:
$qSupported#37...Ack

Packet
received:

Packet qSupported (supported-packets) is NOT
supported
Sending packet:
$?#3f...Ack

Packet received:
S05

Sending packet:
$Hc-1#09...Ack

Packet received:
OK

Sending packet:
$qC#b4...Ack

Packet received:
QC0000000000000001

Sending packet:
$qOffsets#4b...Ack

Packet
received:

Sending packet:
$Hg1#e0...Ack

Packet received:
OK

Sending packet:
$g#67...Ack

Packet received:
42000000dddd000046000000537e59c1541f05f75c1f05f7284f6ac1a37758c1e3c905c19602000060000000680000007b006ac17b0058c1ffff0000ffff0000
kgdb_register_io_module (new_kgdb_io_ops=<value optimized out>) at
kernel/kgdb.c:1807

1807            wmb(); /* Sync point after breakpoint
*/

Sending packet:
$qSymbol::#5b...Ack

Packet
received:

Packet qSymbol (symbol-lookup) is NOT
supported

(gdb) b
load_module

Sending packet:
$mc1046f48,1#ca...Ack

Packet received:
55

Sending packet:
$mc1046f48,1#ca...Ack

Packet received:
55

Sending packet:
$mc1046f48,1#ca...Ack

Packet received:
55

Sending packet:
$mc1046f48,1#ca...Ack

Packet received:
55

Sending packet:
$mc1046f48,a#fa...Ack

Packet received:
5589e55789d7565389c3

Sending packet:
$mc1046f48,1#ca...Ack

Packet received:
55

Sending packet:
$mc1046f49,1#cb...Ack

Packet received:
89

Sending packet:
$mc1046f4a,5#f7...Ack

Packet received:
e55789d756

Sending packet:
$mc1046f4a,5#f7...Ack

Packet received:
e55789d756

Sending packet:
$mc1046f49,1#cb...Ack

Packet received:
89

Sending packet:
$mc1046f4a,1#f3...Ack

Packet received:
e5

Sending packet:
$mc1046f4b,1#f4...Ack

Packet received:
57

Sending packet:
$mc1046f4b,1#f4...Ack

Packet received:
57

Sending packet:
$mc1046f4c,1#f5...Ack

Packet received:
89

Sending packet:
$mc1046f4c,1#f5...Ack

Packet received:
89

Sending packet:
$mc1046f48,1#ca...Ack

Packet received:
55

Breakpoint 1 at 0xc1046f58: file kernel/module.c, line
1915.

(gdb) b
sys_sync

Sending packet:
$mc10aa2e9,1#20...Ack

Packet received:
55

Sending packet:
$mc10aa2e9,1#20...Ack

Packet received:
55

Sending packet:
$mc10aa2e9,1#20...Ack

Packet received:
55

Sending packet:
$mc10aa2e9,1#20...Ack

Packet received:
55

Sending packet:
$mc10aa2e9,a#50...Ack

Packet received:
55b80100000089e5e882

Sending packet:
$mc10aa2e9,1#20...Ack

Packet received:
55

Sending packet:
$mc10aa2ea,1#48...Ack

Packet received:
b8

Sending packet:
$mc10aa2eb,4#4c...Ack

Packet received:
01000000

Sending packet:
$mc10aa2ef,1#4d...Ack

Packet received:
89

Sending packet:
$mc10aa2f0,5#1c...Ack

Packet received:
e5e882ffff

Sending packet:
$mc10aa2f0,5#1c...Ack

Packet received:
e5e882ffff

Sending packet:
$mc10aa2ef,1#4d...Ack

Packet received:
89

Sending packet:
$mc10aa2f0,1#18...Ack

Packet received:
e5

Sending packet:
$mc10aa2f1,1#19...Ack

Packet received:
e8

Sending packet:
$mc10aa2f1,1#19...Ack

Packet received:
e8

Sending packet:
$mc10aa2f1,1#19...Ack

Packet received:
e8

Sending packet:
$mc10aa2f2,1#1a...Ack

Packet received:
82

Sending packet:
$mc10aa2e9,1#20...Ack

Packet received:
55

Breakpoint 2 at 0xc10aa2f1: file fs/sync.c, line
41.

*(gdb) c *

Continuing.

Sending packet:
$Z0,c1046f58,1#14...Ack

Packet received:
OK

Packet Z0 (software-breakpoint) is
supported

Sending packet:
$Z0,c10aa2f1,1#62...Ack

Packet received:
OK

Sending packet:
$vCont?#49...Ack

Packet
received:

Packet vCont (verbose-resume) is NOT
supported

Sending packet:
$Hc0#db...Ack

Packet received:
OK

Sending packet:
$c#63...Ack

Packet received:
T05thread:0000000000000676;

*[New Thread 1654]        *

Sending packet:
$g#67...Ack

Packet received:
18e0a60908e0a60963b2000018e0a609e4beabf69cbfabf6fcffffff63b20000596f04c19602000060000000680000007b008df67b00abf6ffff0000ffff0000
Sending packet:
$P8=586f04c1#c6...Ack

Packet
received:

Packet P (set-register) is NOT supported
Sending packet:
$G18e0a60908e0a60963b2000018e0a609e4beabf69cbfabf6fcffffff63b20000586f04c19602000060000000680000007b008df67b00abf6ffff0000ffff0000#48...Ack
Packet received: OK
Sending packet: $g#67...Ack
Packet received:
18e0a60908e0a60963b2000018e0a609e4beabf69cbfabf6fcffffff63b20000586f04c19602000060000000680000007b008df67b00abf6ffff0000ffff0000
*[Switching to Thread 1654]*
Sending packet: $z0,c1046f58,1#34...Ack
Packet received: E02
*Cannot remove breakpoints because program is no longer writable.
It might be running in another process.
Further execution is probably impossible.*

Sending packet: $m9a6e008,8#9e...Ack
Packet received: 0000000000000000
Breakpoint 1, load_module (umod=0x9a6e018, len=45667, uargs=0x9a6e008 "") at
kernel/module.c:1915
1915            if (len < sizeof(*hdr))


==================================================================================================

Above test done on ubuntu-jaunty x86 m/c,
gcc version : gcc (Ubuntu-4.3.3-5Ubuntu4)


Appreciate your suggestions.

Thanks.

Santosh

On Mon, Jul 27, 2009 at 8:02 PM, Jason Wessel <[email protected]>wrote:

> Santosh Shukla wrote:
> > Hi All,
> >
> > Kernel Version : 2.6.30
> > Arch : x86
> >
> > I have tried KGDBOE (kgdb over Ethernet) on v2.6.30 from
> linux-2.6-kgdb.git jwessel tree. I found that, After hitting the breakpoint,
> and then saying continue, console throws the message like " Cannot remove
> breakpoints because program is no longer writable. " After that, I have to
> exit from current gdb session to new gdb session so as to "delete" all the
> previous breakpoint and get the console login prompt.
> >
> > Following is the test log:
> >
> > Host Side:
> >
> ========================================================================================
> > [r...@localhost linux-2.6-kgdb]# gdb vmlinux
> > Copyright (C) 2008 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-linux-gnu".
> > For bug reporting instructions, please see:
> > (gdb) target remote udp:10.161.3.199:6443
> > warning: The remote protocol may be unreliable over UDP.
> > Some events may be lost, rendering further debugging impossible.
> > Remote debugging using udp:10.161.3.199:6443
> > kgdb_breakpoint () at kernel/kgdb.c:1807
> > 1807            wmb(); /* Sync point after breakpoint */
> > (gdb) b sys_sync
> > Breakpoint 1 at 0xc10a7dcd: file fs/sync.c, line 41.
> > (gdb) c
> > Continuing.
> > [New Thread 1415]
> > [Switching to Thread 1415]
> > Cannot remove breakpoints because program is no longer writable.
> > It might be running in another process.
> > Further execution is probably impossible.
> >
> > Breakpoint 1, sys_sync () at fs/sync.c:41
> > 41              do_sync(1);
> > (gdb) c
> > Continuing.
> > Cannot remove breakpoints because program is no longer writable.
> > It might be running in another process.
> > Further execution is probably impossible.
> >
> >
>
>
> You could have stopped here in your series of commands.  At this point
> gdb is not likely restoring the IP register correctly and as a result
> the kernel is going to crash because it is executing instructions out of
> order or in some cases, skipping an instruction.
>
> Looks to me like it is gdb or gdb configuration problem.   But there is
> no way to know for certain without looking at what it was trying to do
> when talking to kgdb.   You probably want to take a look at what gdb is
> transmitting to and from the kernel.  Before you connect to the target
> system you execute:
>
> set debug remote 1
>
> That will print out all the information going between gdb and kgdb.
>
> Jason.
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to