DW_OP_implict_value usage and motivation

Jakub Jelinek jakub@redhat.com
Sat Jul 4 17:03:13 GMT 2020

On Sat, Jul 04, 2020 at 04:23:58PM +0000, Tomar, Sourabh Singh wrote:
> Consider the following test case:
> [..]
> int main () {
>         __int128 newVar = 8;
>         newVar = ~newVar;
>         return 0;
> }

DW_OP_implicit_value as well as DW_OP_stack_value is described in DWARF4/5,
just read the description in there.
And as you found, in some cases it is possible to represent the value by
either of those, in which case GCC tries to use the shorter one.
For __int128, to use DW_OP_stack_value one would need to use the typed DWARF
stack DWARF5 features (so e.g. inappropriate in DWARF4 mode when it can be
represented by DWARF4 features already).


More information about the Gcc mailing list