This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
[bug] problem printing local vars in shared lib function
- From: Michael Snyder <msnyder at vmware dot com>
- To: gdb at sourceware dot org
- Date: Mon, 27 Oct 2008 16:03:42 -0700
- Subject: [bug] problem printing local vars in shared lib function
Does this sound familiar to anybody? X86_64...
I have a local shared library function, built with -g,
gdb has its symbols and can list it, step into it, step
within it etc.
I can print the values of the function parameters, but
not the values of local (automatic) variables. These
are not statics but autos on the stack.
GDB complains that the memory is inaccessible when
I use "print", but if I use "examine" ('x'), it works
fine and displays the value.
Doesn't seem to matter what the type of the variable is.
Stack variables in the main executable program (ie. not
in the shared library) work fine.
I've even tried this with -gstabs as opposed to dwarf.
Same symptom.
Executable: GNU gdb 6.8-debian
OS: Ubuntu Hardy (8.0.4) x86_64, kernel 2.6.24-19-generic