This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: "optimized out" in spite of DWARF saying otherwise?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Michael Haupt <michael dot haupt at oracle dot com>
- Cc: gdb at sourceware dot org
- Date: Fri, 22 Mar 2013 08:36:28 +0100
- Subject: Re: "optimized out" in spite of DWARF saying otherwise?
- References: <C3092A95-675A-4C3C-9CBF-48F37DAC9A50 at oracle dot com> <20130321164806 dot GA19532 at host2 dot jankratochvil dot net> <89D4A69A-008A-4D56-9F2C-1F94AE41F62D at oracle dot com>
On Thu, 21 Mar 2013 21:15:20 +0100, Michael Haupt wrote:
> The offending one I asked about is just a mark. There is no guarantee as to
> which instruction there is at the address in question; is it "safe" to use
> an extent of, say, 1, or does the instruction length govern that?
At least for GDB it is OK to use length 1 and IIUC the standard also
implicitly says so.
GDB+GCC use a special notation for calls: Address of the call instruction is
used before stepping in, call-instr-length - 1 address is used when inside the
callee and then normally address of next instruction after the call one when
the callee returns.
Regards,
Jan