Re: How to interpret @entry function argument values?
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
> From: "Ananthakrishna Sowda (asowda)" <[email protected]> > Date: Fri, 22 Sep 2017 23:03:58 +0000 > > When I see @entry values , for example ‘pos’ and ‘color’ in frame 2 below : > (gdb) bt > #0 update_liberties (s=0) at engine/board.c:2871 > #1 0x000000000040f2c4 in do_remove_string (s=s@entry=1) at engine/board.c:2989 > #2 0x00000000004108ba in do_play_move (pos=pos@entry=64, color=color@entry=2) at engine/board.c:3416 > …. > > > Does it mean: > > a. The argument variable is <optimized out> and their values at function entry are shown. ( pos =<optimized out> at 0x4108ba , pos@entry=64) > b. Value at current PC and at entry is same. ( pos=64 at 0x4108ba , pos@entry=64) > This is described at length in the GDB manual, in the node "Print Settings", under "set print entry-values". In a nutshell, this is printed when the value at entry is known, by default even if it's identical to the current value.