Question

I use both GDB and DBX depending on the platform I'm debugging. I need to debug a tool where there are 20 command line parameters that need to be passed. GDB has an option where you can pass these parameters upon gdb startup:

gdb --args ...

I am looking for a similar way to do this in DBX. I'm hoping to save time rather than cutting and pasting all the time. I read parts of the manual, and I couldn't see a way to do this.

Was it helpful?

Solution

you can execute runargs command on startup

dbx -c "runargs --all --your --flags" a.out

OTHER TIPS

If you need to run app with name yourApp using dbx for debugging. For example: yourApp param1 param2

You can do it by using command run from dbx:

> dbx yourApp
Type 'help' for help.
reading symbolic information ...
(dbx) run param1 param2
      //some output made by yourApp
(dbx)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top