在同一个过程中,当与亚洲开发银行脱钩并检查可变的颗粒物_客户_handle_msg时,我首先使用了电变数指令,然后印刷其价值,获得正常价值:
#gdb attach 100
(gdb) info variables grpc_client_handle_msg
All variables matching regular expression "grpc_client_handle_msg":
File lib/grpc.c:
21: P_GRPC_CLIENT_HANDLE_MSG *grpc_client_handle_msg;
Non-debugging symbols:
0x000000000096c698 grpc_client_handle_msg
(gdb) p grpc_client_handle_msg
$1 = (P_GRPC_CLIENT_HANDLE_MSG *) 0x773c000
(gdb)
然而,当我首次印刷信息,然后使用信息变数指令时,价值为0x0:
#gdb attach 100
(gdb) p grpc_client_handle_msg
$1 = (P_GRPC_CLIENT_HANDLE_MSG *) 0x0
(gdb) info variables grpc_client_handle_msg
All variables matching regular expression "grpc_client_handle_msg":
File lib/grpc.c:
21: P_GRPC_CLIENT_HANDLE_MSG *grpc_client_handle_msg;
(gdb) p grpc_client_handle_msg
$2 = (P_GRPC_CLIENT_HANDLE_MSG *) 0x0
(gdb)
During these two operations, there was no intentional modification to the value.
I try 10 times, when used info variables first, the variable value is always 0x773c000, and when used print first, the variable value is always 0x0. The variable is init and not change it again.