This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to interpret @entry function argument values?
- From: Eli Zaretskii <eliz at gnu dot org>
- To: "Ananthakrishna Sowda \(asowda\)" <asowda at cisco dot com>
- Cc: gdb at sourceware dot org
- Date: Sat, 23 Sep 2017 09:24:36 +0300
- Subject: Re: How to interpret @entry function argument values?
- Authentication-results: sourceware.org; auth=none
- References: <E024027B-915C-4054-86C2-6490B746E915@cisco.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: "Ananthakrishna Sowda (asowda)" <asowda@cisco.com>
> 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.