Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Trying to track a sleeping CGI request with gdb

by ikegami (Pope)
on Oct 10, 2006 at 18:04 UTC ( #577459=note: print w/replies, xml ) Need Help??

in reply to Trying to track a sleeping CGI request with gdb

Not knowing gdb, that should surely be

gdb /usr/bin/perl /path/to/cgi-bin/script.cgi 1234

Remember, perl is the executable. The script name and arguments for the script are arguments to perl.

( I thought 1234 was for the perl script, not for gdb, so I extrapolated incorrectly. )

Replies are listed 'Best First'.
Re^2: Trying to track a sleeping CGI request with gdb
by Chady (Priest) on Oct 10, 2006 at 20:22 UTC

    Yes, but gdb expects after the program name, a core dump file, or a pid.

    So to pass arguments to the executable, you need to run it from within gdb as such:

    $ gdb /usr/bin/perl ... .. (gdb) run /path/to/cgi-bin/script.cgi

    He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.
    Chady |
    Are you a Linux user in Lebanon? join the Lebanese GNU/Linux User Group.
      "--args" gdb option allows to pass arguments to the executable given a program X and list of parameters a b c: %gdb --args X a b c

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://577459]
[Corion]: :-D
[Eily]: congrats Discipulus :)
[Eily]: (somehow I just typed "cong" and chrome proposed to complete the message :D )
[shmem]: Discipulus: well, a node with just one glaring truth on it is most easily upvoted ;-)
[Discipulus]: i'd like to be the vote fairy just one month.. ;=)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2017-04-26 11:50 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (473 votes). Check out past polls.