eteran / edb-debugger

edb is a cross-platform AArch32/x86/x86-64 debugger.
GNU General Public License v2.0
2.7k stars 326 forks source link

Command line parameters #703

Closed YuxuanXie closed 5 years ago

YuxuanXie commented 5 years ago

Could you please tell me that how can i add the command line parameters when i debug? Thank you very much.

eteran commented 5 years ago

There are essentially 2 methods to do this:

YuxuanXie commented 5 years ago

I tried to add arguments in the "Options -> Application Arguments" menu item, but it did not work

YuxuanXie commented 5 years ago

And the first method works well. I really appreciate your help!

eteran commented 5 years ago

The menu option should work, if it isn't working, can you describe exactly what you did step by step so I can try to reproduce?

10110111 commented 5 years ago

I can confirm that it's broken (or too unintuitive to use it correctly). I do as follows:

  1. Run EDB
  2. Options → Application Arguments
  3. + button
  4. Replace the text with 5454
  5. Close
  6. File→Open
  7. /bin/sleep
  8. F9, F9 → get exit with code 1, with /bin/sleep: missing operand in the console.
10110111 commented 5 years ago

BTW, third option (which does work) is to specify the arguments in the Run dialog.

YuxuanXie commented 5 years ago

Thanks very much for your help.

eteran commented 5 years ago

@10110111 Hmm, we'll have to look into that then. It's not a feature I use often, but it used to work!

itsallmathematics commented 4 years ago

@eteran I cannot use the GUI to add args.. See screenshot. The box won't let me type anything in and it has no "+" button or any way to add args... Am I missing something? edb_args

eteran commented 4 years ago

@itsallmathematics Sorry, that method of using the feature has actually be removed because it was surprisingly difficult to implement in a user-friendly way (It would contradict the other more direct methods of setting the arguments creating confusion).

For this reason, that dialog was moved to the view menu, since you can view the parameters, but not edit them.

The current correct way is either through the command line parameters or the file open-dialog.