This is the mail archive of the gdb-prs@sourceware.org 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]

gdb/2122: attach command does not accept PID in a variable


>Number:         2122
>Category:       gdb
>Synopsis:       attach command does not accept PID in a variable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu May 04 20:08:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     aregmi@gmail.com
>Release:        6.3.0.0-1.96rh
>Organization:
>Environment:
Red Hat Linux 
>Description:
attch does not accept a PID that is stored in a variable. For example,
(gdb) set $pid = 12345
(gdb) attach $pid
Illegal process -id:$PID
but instead if I just do 
(gdb) attach 12345 
it just works fine.

If there is a concern about why do we need to have the pid in a variable, then the reason is gdb can be used for automated testing for gnu based application and when there is a need to test some initialization behavior the application needs to be killed and restarted again through gdb scripts. I would be able to do every thing I need to automated testing if I could use a variable with attach command. 
>How-To-Repeat:
I have explained it in decription.
>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]