public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001614] New: eCos GDB stub "detach" reply incompatible with GDB 7.4.1
@ 2012-06-24 16:43 bugzilla-daemon
  2012-06-24 16:48 ` [Bug 1001614] " bugzilla-daemon
  2012-06-25 12:29 ` bugzilla-daemon
  0 siblings, 2 replies; 4+ messages in thread
From: bugzilla-daemon @ 2012-06-24 16:43 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001614

           Summary: eCos GDB stub "detach" reply incompatible with GDB
                    7.4.1
           Product: eCos
           Version: CVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: normal
         Component: GDB stubs
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: john@dallaway.org.uk
                CC: ecos-bugs@ecos.sourceware.org
             Class: Advice Request


The generic eCos GDB stub code replies to a "D" detach packet with an empty
string. This causes GDB 7.4.1 to report "Remote doesn't know to detach".
According to GDB documentation, the GDB stub should reply "OK" to indicate
success - otherwise GDB will believe it is still attached to the target:

(gdb) det
Sending packet: $qTStatus#49...Ack
Packet received: 
Sending packet: $D#44...Ack
Packet received: 
Remote doesn't know how to detach
(gdb) 

Older GDB will interpret a reply of either "OK" or an empty string as an
indication of success (tested with GDB 5.3).

Patch to follow.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1001614] eCos GDB stub "detach" reply incompatible with GDB 7.4.1
  2012-06-24 16:43 [Bug 1001614] New: eCos GDB stub "detach" reply incompatible with GDB 7.4.1 bugzilla-daemon
@ 2012-06-24 16:48 ` bugzilla-daemon
  2012-06-25 12:29 ` bugzilla-daemon
  1 sibling, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2012-06-24 16:48 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001614

--- Comment #1 from John Dallaway <john@dallaway.org.uk> 2012-06-24 17:48:43 BST ---
Created an attachment (id=1803)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1803)
gdb-stub-detach-120624.patch

The patch resolves the reported issue by replying "OK" (rather than an empty
string) to GDB detach requests ("D" packets).

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1001614] eCos GDB stub "detach" reply incompatible with GDB 7.4.1
  2012-06-24 16:43 [Bug 1001614] New: eCos GDB stub "detach" reply incompatible with GDB 7.4.1 bugzilla-daemon
  2012-06-24 16:48 ` [Bug 1001614] " bugzilla-daemon
@ 2012-06-25 12:29 ` bugzilla-daemon
  1 sibling, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2012-06-25 12:29 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001614

Jonathan Larmour <jifl@ecoscentric.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 CC|                            |jifl@ecoscentric.com
         AssignedTo|unassigned@bugs.ecos.source |jifl@ecoscentric.com
                   |ware.org                    |

--- Comment #2 from Jonathan Larmour <jifl@ecoscentric.com> 2012-06-25 13:28:42 BST ---
The patch isn't right. GDB is correct - the remote side doesn't know how to
detach, hence the "null" packet rather than OK.

In all versions of GDB to date, GDB will stop talking to the target (closing
tcp socket if needed) anyway. I assume that is still the case in 7.4.1? e.g. if
you try and quit gdb, it won't complain it is still attached to the target. For
that reason at present we treat detach the same as 'kill', which this patch
wouldn't change. We treat it as 'kill' because it's arguably better to
potentially return to redboot (if applicable) than just get stuck forever in
the stub until a manual reset.

We could make a few changes to support detach properly with I think a bit of
extra code and a little global data, but is this an important enough feature to
add if no-one actually uses it the way it's intended? Presumably you don't
actually need the correct behaviour since this patch would continue to make it
identical to 'kill', as all this patch does is silence the message.

Jifl

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1001614] New: eCos GDB stub "detach" reply incompatible with GDB 7.4.1
@ 2012-06-24 16:43 bugzilla-daemon
  0 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2012-06-24 16:43 UTC (permalink / raw)
  To: ecos-bugs

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001614

           Summary: eCos GDB stub "detach" reply incompatible with GDB
                    7.4.1
           Product: eCos
           Version: CVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: normal
         Component: GDB stubs
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: john@dallaway.org.uk
                CC: ecos-bugs@ecos.sourceware.org
             Class: Advice Request


The generic eCos GDB stub code replies to a "D" detach packet with an empty
string. This causes GDB 7.4.1 to report "Remote doesn't know to detach".
According to GDB documentation, the GDB stub should reply "OK" to indicate
success - otherwise GDB will believe it is still attached to the target:

(gdb) det
Sending packet: $qTStatus#49...Ack
Packet received: 
Sending packet: $D#44...Ack
Packet received: 
Remote doesn't know how to detach
(gdb) 

Older GDB will interpret a reply of either "OK" or an empty string as an
indication of success (tested with GDB 5.3).

Patch to follow.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-25 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-24 16:43 [Bug 1001614] New: eCos GDB stub "detach" reply incompatible with GDB 7.4.1 bugzilla-daemon
2012-06-24 16:48 ` [Bug 1001614] " bugzilla-daemon
2012-06-25 12:29 ` bugzilla-daemon
  -- strict thread matches above, loose matches on Subject: below --
2012-06-24 16:43 [Bug 1001614] New: " bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).