about PR gdb/10002 (extern optimized out symbols print: Address of symbol is unknown)

Paul Pluzhnikov ppluzhnikov@google.com
Wed Mar 25 23:00:00 GMT 2009


On Wed, Mar 25, 2009 at 3:26 PM, Joel Brobecker <brobecker@adacore.com> wrote:

> This seems correct to me.  However, the testcase itself is a little
> borderline in my opinion.

The test case depends on compiler's ability to optimize out reference to
"missing". If the compiler couldn't do that, you'd get an unresolved symbol
at link time.

> The variable was not "optimized out", but was never linked in.

Well, the reference to the variable was optimized out.

> It's as if it really does not exist.

I think it's not "as if"; it *really* doesn't.

> So I don't know if GDB is really all that incorrect, here. Thoughts?

I don't see anything wrong about GDB's output.

-- 
Paul Pluzhnikov



More information about the Gdb mailing list