public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: Tom Rini <trini@kernel.crashing.org>
Cc: "Amit S. Kale" <amitkale@emsyssoft.com>,
	kernel list <linux-kernel@vger.kernel.org>,
	Pavel Machek <pavel@suse.cz>,
	kgdb-bugreport@lists.sourceforge.net
Subject: Re: [Kgdb-bugreport] [PATCH][3/3] Update CVS KGDB's wrt connect / detach
Date: Fri, 27 Feb 2004 13:55:30 -0800	[thread overview]
Message-ID: <403FBCD2.4050005@mvista.com> (raw)
In-Reply-To: <20040227171339.GA1052@smtp.west.cox.net>

Tom Rini wrote:
> On Thu, Feb 26, 2004 at 05:57:27PM -0800, George Anzinger wrote:
> 
>>Tom Rini wrote:
>>
>>>- Connect to a waiting kernel, continue/^C/disconnect/reconnect.
>>>- Connect to a running kernel, continue/^C/disconnect/reconnect.
>>>- Once connected and running, ^C/hit breakpoint and
>>> disconnect/reconnect.
>>>- Once connected, set a breakpoint, kill gdb and hit the breakpoint and
>>> reconnect.
>>>- Once connected and running, kill gdb and reconnect.
>>>
>>>The last two aren't as "fast" as I might like, but they're the "gdb went
>>>away in an ungraceful manner" situations, so I think it's OK.  In the
>>>first (breakpoint hit, no gdb) I end up having to issue a few continues
>>>to get moving again, but it's a one-time event.  
>>
>>What are you referring to as "continues".  How is this different from 
>>connect to a waiting kernel?   Usually this would be the end of the 
>>session.  If you are going to continue from here something needs to be done 
>>with the breakpoint that gdb does not know about.  If kgdb can remove them, 
>>well fine, except your stopped on one.  If you remove it, there could be 
>>some confusion as to why you are in the debugger.  This would be a fine 
>>time for a note to the user from kgdb.  It is too bad that the interface 
>>does not admit to such a thing.
> 
> 
> OK, I've rechecked the senarios, and the only time gdb/kgdb seems a bit
> confused is when gdb sets a bpt / dies / bpt is triggered.  It looks
> like this (on gdb reattaching to the now stuck host, gdb 6.0):
> Remote debugging using /dev/ttyS0
> Sending packet: $qPassSignals:0e;10;14;17;1a;1b;1c;21;24;25;4c;#df...Ack
> Packet received: 
> Packet qPassSignals (pass-signals) is NOT supported
> Sending packet: $Hc-1#09...Ack
> Packet received: OK
> Sending packet: $qC#b4...Ack
> Packet received: QC00000000000000d0
> Sending packet: $qOffsets#4b...Ack
> Packet received: 
> Sending packet: $?#3f...Ack
> 
> <- At this point, kgdb calls remove_all_break() ->
I don't know this code, but if the current PC is at a given BP+1 you may need to 
back up the PC to point to the, now replaced, instruction.  You could verify 
this by looking, at this point, at what gdb has for the PC.  Odds are that it is 
either mid instruction or after the instruction that was replaced by the BP 
(depends on the relative length of the BP instruction and the replaced 
instruction).

-g
> 
> Packet received: S05
> Sending packet: $Hgd0#43...Ack
> Packet received: OK
> Sending packet: $g#67...Ack
> Packet received: 27000000ff0100007b000000c0feffbf703f55d6bc3f55d6c0feffbfd4fdffbf8a4815c08202000060000000680000007b0069d77b000000ffff0000ffff0000
> 0xc015488a in sys_mkdir (Sending packet: $m27,8#3a...Ack
> Packet received: E22
> Sending packet: $m27,8#3a...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> pathname=0x27 <Address 0x27 out of bounds>, 
>     mode=-1073742144) at fs/namei.c:1533
> 1533		tmp = getname(pathname);
> Sending packet: $qSymbol::#5b...Ack
> Packet received: 
> Packet qSymbol (symbol-lookup) is NOT supported
> 
> <- continue ->
> 
> Continuing.
> Sending packet: $Hsd0#4f...Ack
> Packet received: 
> Sending packet: $Hc0#db...Ack
> Packet received: OK
> Sending packet: $c#63...Ack
> Packet received: T0bthread:00000000000000d0;
> [New Thread 208]
> Sending packet: $g#67...Ack
> Packet received: 27000000ff0100007b000000c0feffbf703f55d6bd3f55d6c0feffbfd4fdffbf8b4815c08602010060000000680000007b0069d77b000000ffff0000ffff0000
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0xc015488b in sys_mkdir (Sending packet: $m27,8#3a...Ack
> Packet received: E22
> Sending packet: $m27,8#3a...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> pathname=0x27 <Address 0x27 out of bounds>, 
>     mode=-1073742144) at fs/namei.c:1533
> 1533		tmp = getname(pathname);
> 
> <- continue ->
> 
> Continuing.
> Sending packet: $C0b#d5...Ack
> Packet received: 
> Can't send signals to this remote system.  SIGSEGV not sent.
> Sending packet: $c#63...Ack
> Packet received: T05thread:00000000000000d0;
> Sending packet: $g#67...Ack
> Packet received: 27000000ff0100007b000000c0feffbf703f55d6bd3f55d6c0feffbfd4fdffbf8b4815c08602010060000000680000007b0069d77b000000ffff0000ffff0000
> 
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0xc015488b in sys_mkdir (Sending packet: $m27,8#3a...Ack
> Packet received: E22
> Sending packet: $m27,8#3a...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> Sending packet: $m27,1#33...Ack
> Packet received: E22
> pathname=0x27 <Address 0x27 out of bounds>, 
>     mode=-1073742144) at fs/namei.c:1533
> 1533		tmp = getname(pathname);
> 
> <- continue ->
> 
> Continuing.
> Sending packet: $c#63...Ack
> 
> <- From here, the system is OK again ->
> 
> remote_interrupt called
> remote_stop called
> Packet received: T05thread:0000000000008000;
> [New Thread 32768]
> Sending packet: $g#67...Ack
> Packet received: 0100000004000000000000000400000068df28c06cdf28c080000000809a28c05afd12c00200000060000000680000007b0010c07b000000ffff0000ffff0000
> 
> Program received signal SIGTRAP, Trace/breakpoint trap.
> [Switching to Thread 32768]
> breakpoint () at kernel/kgdb.c:1088
> 1088		atomic_set(&kgdb_setting_breakpoint, 0);
> Sending packet: $D#44...Ack
> Packet received: OK
> Ending remote debugging.
> 

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml


  reply	other threads:[~2004-02-27 22:01 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-25 21:36 [PATCH][1/3] Update CVS KGDB's serial driver Tom Rini
2004-02-25 21:43 ` [PATCH][2/3] Update CVS KGDB's have kgdb_{schedule,process}_breakpoint Tom Rini
2004-02-25 21:53   ` [PATCH][3/3] Update CVS KGDB's wrt connect / detach Tom Rini
2004-02-26  8:14     ` [Kgdb-bugreport] " Amit S. Kale
2004-02-26 14:41       ` Tom Rini
2004-02-26 16:05         ` Daniel Jacobowitz
2004-02-26 17:44           ` Tom Rini
2004-02-26 23:32             ` Daniel Jacobowitz
2004-03-01  8:12           ` Amit S. Kale
2004-02-26 21:45         ` Pavel Machek
2004-03-01  8:29           ` Amit S. Kale
2004-02-26 18:08       ` Tom Rini
2004-03-01  8:15         ` Amit S. Kale
2004-02-26 23:30       ` George Anzinger
2004-02-26 23:59         ` Tom Rini
2004-02-27  1:57           ` George Anzinger
2004-02-27 15:49             ` Tom Rini
2004-02-27 22:11               ` George Anzinger
2004-02-27 22:50                 ` Tom Rini
2004-03-01 10:18                   ` Amit S. Kale
2004-03-01 10:17                 ` Amit S. Kale
2004-02-27 17:13             ` Tom Rini
2004-02-27 21:55               ` George Anzinger [this message]
2004-03-01  8:36         ` Amit S. Kale
2004-03-01 16:31           ` Tom Rini
2004-02-25 22:59   ` [Kgdb-bugreport] [PATCH][2/3] Update CVS KGDB's have kgdb_{schedule,process}_breakpoint George Anzinger
2004-02-25 23:04     ` Tom Rini
2004-02-25 23:23       ` George Anzinger
2004-02-26  7:30   ` Amit S. Kale
2004-02-26 23:19     ` George Anzinger
2004-03-01  8:32       ` Amit S. Kale
2004-03-02 21:19         ` George Anzinger
2004-03-03  5:13           ` Amit S. Kale
2004-03-04  0:20             ` George Anzinger
2004-03-04  4:58               ` Amit S. Kale
2004-03-11 21:28                 ` George Anzinger
2004-03-12  4:44                   ` Amit S. Kale
2004-03-12  8:03                     ` George Anzinger
2004-03-15 11:20                       ` Amit S. Kale
2004-03-15 19:52                         ` George Anzinger
2004-03-16  4:30                           ` Amit S. Kale
2004-03-16 13:02                             ` La Monte H.P. Yarroll
2004-03-16 15:04                               ` Amit S. Kale
2004-02-25 23:10 ` [Kgdb-bugreport] [PATCH][1/3] Update CVS KGDB's serial driver George Anzinger
2004-02-25 23:18   ` Tom Rini
2004-02-26  8:25 ` Amit S. Kale
2004-02-26 14:43   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=403FBCD2.4050005@mvista.com \
    --to=george@mvista.com \
    --cc=amitkale@emsyssoft.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=trini@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox