This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: if defined(symbol-name) ??


In article <20000215144327.A17482@visi.com> you write:
>
>In a macro, I'd like to do something conditionally depending on
>whether a symbol is defined or not.  Something like
>
> if defined(cyg_test_exit)
>   break cyg_test_exit
>   end

I don't know how to do that, but to do what you are trying to achieve,
you can use "rbreak" instead of "break", which won't complain and stop
the .gdbinit processing if the symbol isn't found.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]