Broadly speaking, a core file is a dump of the entire memory used by a process plus the CPU registers state. So, in general, the information you can retrieve from a core file is the same that you could get by attaching a debugger to the process just before it crashed.
If I do not strip symbols from my application and libraries, are the core files still useful?
From the Wikipedia page Core dump:
``On modern Unix-like operating systems, administrators and
programmers can read core dump files using the GNU Binutils Binary
File Descriptor library (BFD), [...] This library will supply the
raw data for a given address in a memory region from a core dump; it
does not know anything about variables or data structures in that
memory region, so the application using the library to read the core
dump will have to determine the addresses of variables and determine
the layout of data structures itself, for example by using the
symbol table for the program undergoing debugging.''
So the answer to your first question is: no, core dump files are of
little use if you strip symbols away from the executable.
However, symbols just take up some disk space and do not otherwise
affect performance: you can compile with maximum optimization and
-g at the same time.
Will the core files be useful if I compile my application with maximum possible optimization?
Since a core file is just a dump of the memory and the processor state
when your application crashed, the general warning about optimization
and debugging applies: a debugger will only find information (e.g.,
the value of a variable, or a function call in a stack backtrace) if
it wasn't optimized out.