This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdbMI/790: -target-attach not implemented


The following reply was made to PR gdbMI/790; it has been noted by GNATS.

From: Andrew Cagney <ac131313@redhat.com>
To: gdb-gnats@sources.redhat.com
Cc: alain@qnx.com
Subject: Re: gdbMI/790: -target-attach not implemented
Date: Tue, 15 Oct 2002 14:53:06 -0400

 Some additional information.
 
 The underlying implementation of commands like ``(gdb) target ...'' and 
 ``(gdb) attach ...'' are really simplistic and don't lend themselves to 
 MI.  For these, the command map directly onto target method calls. 
 There isn't any intervening code.  For instance, for ``target remote'', 
 the CLI directly calls remote_open() vis:
 
 	CLI parses ``target remote''
 	CLI calls remote_open()
 
 What should happen instead is:
 
 	CLI parses ``target remote''
 	CLI calls target_open("remote")
 	target_open() calls remote->open()
 	remote->open() calls remote_open()
 
 That would allow MI to do similar:
 
 	MI parses -target-remote
 	MI calls target_open("remote")
 	et.al.
 
 On a positive note, one of the technical hurdles blocking this - CLI 
 commands needing a context parameter - has been fixed.  It is now 
 possible to register with the CLI a function like target_open(target) 
 and hence start modifying the target vector to be called like the above.
 
 Also look through the bug database.  Other bug reports make reference to 
 this as well.
 
 Andrew
 
 
 >>Number:         790
 >>Category:       gdbMI
 >>Synopsis:       -target-attach not implemented
 >>Confidential:   no
 >>Severity:       serious
 >>Priority:       medium
 >>Responsible:    unassigned
 >>State:          open
 >>Class:          sw-bug
 >>Submitter-Id:   net
 >>Arrival-Date:   Mon Oct 07 11:48:01 PDT 2002
 >>Closed-Date:
 >>Last-Modified:
 >>Originator:     alain@qnx.com
 >>Release:        unknown-1.0
 >>Organization:
 >>Environment:
 > 
 > gdb-5.2.1
 > 
 >>Description:
 > 
 > To be able to attach to a running program in gdb/mi
 > One has to do
 > 
 > (gdb)
 > attach pid
 > &"attach pid\n"
 > ^done,....
 > (gdb)
 > 
 > -target-attach is not implemented.
 > 
 > It would be nice to actually have -target-attach
 > returning something else then ^running, to make a distinction
 > say:
 > 
 > (gdb)
 > -target-attach pid
 > ^attached,thread-id="0",frame={...}
 > (gdb)
 > 
 > The same way -target-select return connected
 > 
 > (gdb)
 > -target-select  ...
 > ^connected ...
 > (gdb)
 > 
 >>How-To-Repeat:
 > 
 > 
 >>Fix:
 > 
 > 
 >>Release-Note:
 >>Audit-Trail:
 >>Unformatted:
 > 
 > 
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]