I use gdb to debug the program and I want to get the output of the command
$(perl -e 'print "A"x20')
as my argument. How can i do this? Thus, the argument will be very flexible.
You can use the run command and pass it any parameters that will be arguments.
If you want to do the above, try:
run `$(perl -e 'print "A"x20')`
as a command after starting gdb.
The above does not work a bit and will not work for me. If you use the set args command, the following will work (at least on my system):
set args "`perl -e 'print "A"x20;'`"
, "run" .
It looks like you did not run your program using gdb. Suppose your program is "a.out", in bash:
$gdb a.out (gdb)run `$(perl -e 'print "A"x20')`
Hope this helps you.
Source: https://habr.com/ru/post/1711681/More articles:How to erase content in a bitmap - c #Save code in real time with new RDP client - c #Implementing the NHibernate Unit Test to create a circuit using VB.NET/MBUnit - unit-testingЗакрыть всплывающее окно, если оно существует - javascriptEclipse Ruby development tools “require” - eclipseOptimized way to reorder numbering using C # - c #How to deploy a SharePoint 2007 public site - deploymentHow to request a card item in sleep mode? - javaHow to use DLR with MEF in .Net 4.0? - c #SpringIDE and Eclipse Galileo 3.5 - springAll Articles