0
我正在使用GDB調試Linux內核模塊。 加載模塊後,我使用add-symbol-file
添加模塊符號。GDB找不到行號
當我用GDB list
命令查找模塊的象徵,它會找到它,例如:
(gdb) list __do_restart
122 * would provide type of error or success. In the case of early restart support from
123 * cr_mods a signal will be posted at appropriate time.
124 *
125 * NOTE: This type of restarting could be used for migrating parallel processes.
126 */
127 int __do_restart(void *data){
128 struct siginfo info;
129 struct object_stored_data *sd;
130 struct crmod_clients *clt = get_client(data);
131 memset(&info, 0, sizeof(struct siginfo));
(gdb) b __do_restart
Breakpoint 1 at 0xe081740e: file /home/amrzar/Workspace/common/commod.c, line 130.
我甚至可以設置斷點它。但是,在執行第一中斷後,當我使用list
它說:
(gdb) list __do_restart
No line number known for __do_restart
它只是失去了符號!爲什麼? (我可以肯定在目標文件的調試信息存在) 感謝
我已經這樣做了,它也解決了我!謝謝。 – amrzar 2011-06-21 11:59:17