本文整理自《Debugging with GDB: the GNU Source-Level Debugger for GDB (GDB)》 -- Fsf
本文导航
-目录 …… 00%
-break …… 11%
-info breakpoints …… 18%
-disable …… 20%
-enable …… 22%
-clear …… 26%
-delete …… 30%
-tbreak …… 32%
-watch …… 33%
-step …… 36%
-reverse-step …… 40%
-next …… 42%
-reverse-next …… 44%
-return …… 46%
-finish …… 48%
-until …… 50%
-continue …… 52%
-print …… 55%
-x …… 60%
-display …… 67%
-info display …… 70%
-undisplay …… 71%
-disable display …… 72%
-enable display …… 74%
-help …… 75%
-attach …… 78%
-run …… 81%
-backtrace …… 84%
-ptype …… 91%
-参考资料 …… 98%
编译自: https://sourceware.org/gdb/current/onlinedocs/gdb/
作者: Fsf
译者: robot527
set args arg1 arg2 ...
run
(gdb) where
#0 vconn_stream_run (vconn=0x99e5e38) at lib/vconn-stream.c:232
#1 0x080ed68a in vconn_run (vconn=0x99e5e38) at lib/vconn.c:276
#2 0x080dc6c8 in rconn_run (rc=0x99dbbe0) at lib/rconn.c:513
#3 0x08077b83 in ofconn_run (ofconn=0x99e8070, handle_openflow=0x805e274 <handle_openflow>) at ofproto/connmgr.c:1234
#4 0x08075f92 in connmgr_run (mgr=0x99dc878, handle_openflow=0x805e274 <handle_openflow>) at ofproto/connmgr.c:286
#5 0x08057d58 in ofproto_run (p=0x99d9ba0) at ofproto/ofproto.c:1159
#6 0x0804f96b in bridge_run () at vswitchd/bridge.c:2248
#7 0x08054168 in main (argc=4, argv=0xbf8333e4) at vswitchd/ovs-vswitchd.c:125
/* 类型声明与变量定义 */
typedef double real_t;
struct complex {
real_t real;
double imag;
};
typedef struct complex complex_t;
complex_t var;
real_t *real_pointer_var;
(gdb) whatis var
type = complex_t
(gdb) ptype var
type = struct complex {
real_t real;
double imag;
}
(gdb) whatis complex_t
type = struct complex
(gdb) whatis struct complex
type = struct complex
(gdb) ptype struct complex
type = struct complex {
real_t real;
double imag;
}
(gdb) whatis real_pointer_var
type = real_t *
(gdb) ptype real_pointer_var
type = double *
欢迎光临 51学通信论坛2017新版 (http://bbs.51xuetongxin.com/) | Powered by Discuz! X3 |