This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: if defined(symbol-name) ??
- To: grante at visi dot com
- Subject: Re: if defined(symbol-name) ??
- From: jlarmour at redhat dot co dot uk (Jonathan Larmour)
- Date: Wed, 23 Feb 2000 19:39:27 GMT
- Cc: gdb at sourceware dot cygnus dot com
- Newsgroups: cygnus.gdb
- Organization: Red Hat UK Ltd.
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