How to compare $arg0 with string literal?

Aleksey Midenkov midenok@gmail.com
Thu Mar 26 16:28:00 GMT 2015


F.ex.

define logging
    if $argc == 1
        if $arg0 == off
            set logging off
            set logging file gdb.log
        else if $arg0 == stop
            set logging off
        else
            set logging $arg0
        end
    else
        set logging $arg0 $arg1
    end
    show logging
end

When type 'logging off' I get error about no such symbol 'off'...



More information about the Gdb mailing list