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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Ananda Regmi

>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:     [hidden email]
>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: