Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass arguments to my application that include the - symbol on gdb?

I need to pass some arguments to my application,that include the - symbol. The problem is if I pass gdb a.out -foo baa, the gdb understand that the arguments are for it, and not to my application. How to fix this?

like image 553
Jack Avatar asked Jan 16 '23 18:01

Jack


1 Answers

  1. gdb -q a.out
    inside gdb:
  2. run -foo baa

    Tip: -q option for gdb suppresses the introductory copyright messages.
like image 184
Ahmed Jolani Avatar answered Jan 29 '23 14:01

Ahmed Jolani