views:

97

answers:

2

I am using gdb to debug a program, and I want to have the output of the command

$(perl -e 'print "A"x20')

as my argument. How can I do that? This way the argument would be very flexible.

+2  A: 

You can use the run command and pass it any parameters afterwards which will be arguments.

If you want the above, try:

run `$(perl -e 'print "A"x20')`

as a command once you start gdb.

samoz
A: 

This doesn't work for me:

gdb$ run `$(perl -e 'print "A"x20')`
/bin/bash: AAAAAAAAAAAAAAAAAAAA: command not found

And the application runs without paramether...

Sharek