In Examine command GDB, x/10xw Address
. Can I use a variable in place of repeat count
, i.e can I use a variable in place of 10, like x/($var)xw Address
?
This is how my .gdbinit looks like. I need to do some calculations and use the variable ( var3 )
define print_sn_list_hex
set $var1 = $mcache->elem_size
set $var2 = $mcache->blocking_factor
set $var3 = ($var1) * ($var2) / 4
x/$var3xw $sess # I want to pass a variable here
end
end