This is the mail archive of the
mailing list for the GDB project.
Re: Ensure correct symbol-file when attaching to a (remote) process
On 12-12-21 11:11 AM, Jan Kratochvil wrote:
On Fri, 21 Dec 2012 07:05:37 +0100, Raphael Zulliger wrote:
Is there really no such mechanism in GDB?
There is no such reliable mechanism in general.
One could verify build-id in the target, probably that the build-id note is at
the same VMA as present in the local symbol file.
But then also many binaries/compilers do not provide build-id by default (ld
Interesting timing. I have just posted
The check is not exhaustive, but for most practical purposes it should
suffice. It verifies that in-memory elf header and pheaders match those
found in the bfd.
Of course it will not detect difference in all cases, e.g. very small
changes that do not affect loadable segment size. Example:
- static int foo;
- static int bar;
+ static int bar;
+ static int foo;
Still, it should be much better than no check at all.