Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ZLE widget to run gdb on command line



    Hi Chris :)

 * Chris Johnson <cjohnson@xxxxxxxxxx> dixit:
> Hi.  I just thought I'd share a widget that I find helpful.  Invoking
> gdb is something I need to do a lot lately, it seems, and I often think
> I can pass the program's arguments as arguments to gdb:
> 
>    gdb myprog arg1 arg2 arg3
> 
> But gdb doesn't accept this because it expects other unnamed arguments.
> Treating the whole command as a single argument to gdb also fails:
> 
>    gdb "myprog arg1 arg2 arg3"
> 
> The single argument is treated as a single executable name.

    Obvious, gdb gets it as just ONE argument ;)

    Try this:

    gdb --args myprog arg1 arg2 arg3

    (if you don't use a core argument, of course)

    BTW, the widget is quite useful, not only for gdb, but for other
interactive programs too where you ALWAYS run certain command at
startup. Thanks :))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!



Messages sorted by: Reverse Date, Date, Thread, Author