2017-09-25 90 views
0

While inserting the dprintf, format string is present but vanishes when the breakpoint remains pending as the shared library, where breakpoint is inserted is not loaded yet. Hence when dprintf breakpoint is modified, it could not find the format string parameter resulting to error: "Error in re-setting breakpoint 1: Format string required\n". In the gdb traces below, script parameter is missing for dprintf breakpoint when modified.在Eclipse gdb的痕迹虽然断点修饰,我收到此错误dprintf: “:需要格式字符串错误重新设置断点3”

GDB-痕迹

850,705 2-list-thread-groups 
850,715 2^done,groups=[{id="i1",type="process"}] 
850,755 3-gdb-version 
850,815 (gdb) 
850,815 ~"GNU gdb (Linaro GDB) 7.8-2014.09\n" 
850,835 ~"Copyright (C) 2014 Free Software Foundation, Inc.\n" 
850,835 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is fre\ 
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\ 
ed by law. Type \"show copying\"\nand \"show warranty\" for details.\n" 
850,835 ~"This GDB was configured as \"--host=i586-mingw32msvc --target=arm-linux-gnueabihf\".\nType\ 
\"show configuration\" for configuration details." 
850,835 ~"\nFor bug reporting instructions, please see:\n" 
850,835 ~"<http://bugs.linaro.org>.\n" 
850,835 ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/soft\ 
ware/gdb/documentation/>.\n" 
850,835 ~"For help, type \"help\".\n" 
850,835 ~"Type \"apropos word\" to search for commands related to \"word\".\n" 
850,835 3^done 
850,835 (gdb) 
850,895 4-environment-cd D:/Workspace/Oxygen/runtime-DevWS/testOne 
850,905 4^done 
850,905 (gdb) 
850,945 5-gdb-set breakpoint pending on 
850,946 5^done 
850,946 (gdb) 
850,976 6-gdb-set detach-on-fork on 
850,986 6^done 
850,986 (gdb) 
851,006 7-enable-pretty-printing 
851,016 7^done 
851,016 (gdb) 
851,026 8-gdb-set python print-stack none 
851,036 8^done 
851,036 (gdb) 
851,046 9-gdb-set print object on 
851,056 9^done 
851,056 (gdb) 
851,076 10-gdb-set print sevenbit-strings on 
851,086 10^done 
851,086 (gdb) 
851,116 11-gdb-set host-charset UTF-8 
851,126 11^error,msg="Undefined item: \"UTF-8\"." 
851,126 (gdb) 
851,166 12-gdb-set target-charset WINDOWS-1252 
851,176 12^error,msg="Undefined item: \"WINDOWS-1252\"." 
851,176 (gdb) 
851,176 13-gdb-set target-wide-charset UTF-16 
851,186 13^error,msg="Undefined item: \"UTF-16\"." 
851,186 (gdb) 
851,206 14-gdb-set auto-solib-add on 
851,216 14^done 
851,216 (gdb) 
851,226 15-target-select extended-remote 192.168.7.2:1234 
851,438 15^connected 
851,438 (gdb) 
851,458 16-file-symbol-file D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\ABC 
851,728 16^done 
851,728 (gdb) 
851,900 17-target-attach --thread-group i1 248 
851,930 =thread-group-started,id="i1",pid="248" 
851,930 =thread-created,id="1",group-id="i1" 
851,970 18-list-thread-groups 
851,980 &"Cannot access memory at address 0x0\n" 
851,990 17^done 
851,990 =thread-created,id="2",group-id="i1" 
851,990 ~"[New Thread 248.250]\n" 
851,990 =thread-created,id="3",group-id="i1" 
851,990 ~"[New Thread 248.291]\n" 
851,990 =thread-created,id="4",group-id="i1" 
851,990 ~"[New Thread 248.292]\n" 
851,990 =thread-created,id="5",group-id="i1" 
851,990 ~"[New Thread 248.293]\n" 
851,990 =thread-created,id="6",group-id="i1" 
851,990 ~"[New Thread 248.294]\n" 
851,990 =thread-created,id="7",group-id="i1" 
851,990 ~"[New Thread 248.295]\n" 
851,990 =thread-created,id="8",group-id="i1" 
851,990 ~"[New Thread 248.297]\n" 
851,990 =thread-created,id="9",group-id="i1" 
851,990 ~"[New Thread 248.298]\n" 
851,990 =thread-created,id="10",group-id="i1" 
851,990 ~"[New Thread 248.299]\n" 
851,990 =thread-created,id="11",group-id="i1" 
851,990 ~"[New Thread 248.300]\n" 
851,990 =thread-created,id="12",group-id="i1" 
851,990 ~"[New Thread 248.301]\n" 
851,990 =thread-created,id="13",group-id="i1" 
851,990 ~"[New Thread 248.302]\n" 
851,990 =thread-created,id="14",group-id="i1" 
851,990 ~"[New Thread 248.303]\n" 
851,990 =thread-created,id="15",group-id="i1" 
851,990 ~"[New Thread 248.304]\n" 
851,990 =thread-created,id="16",group-id="i1" 
851,990 ~"[New Thread 248.305]\n" 
851,990 =thread-created,id="17",group-id="i1" 
851,990 ~"[New Thread 248.306]\n" 
851,990 =thread-created,id="18",group-id="i1" 
851,990 ~"[New Thread 248.307]\n" 
851,990 =thread-created,id="19",group-id="i1" 
851,990 ~"[New Thread 248.308]\n" 
851,990 =thread-created,id="20",group-id="i1" 
851,990 ~"[New Thread 248.309]\n" 
851,990 =thread-created,id="21",group-id="i1" 
851,990 ~"[New Thread 248.310]\n" 
851,990 =thread-created,id="22",group-id="i1" 
851,990 ~"[New Thread 248.311]\n" 
851,990 =thread-created,id="23",group-id="i1" 
851,990 ~"[New Thread 248.312]\n" 
851,990 =thread-created,id="24",group-id="i1" 
851,990 ~"[New Thread 248.313]\n" 
851,990 =thread-created,id="25",group-id="i1" 
851,990 ~"[New Thread 248.314]\n" 
851,990 =thread-created,id="26",group-id="i1" 
851,990 ~"[New Thread 248.315]\n" 
851,990 =thread-created,id="27",group-id="i1" 
851,990 ~"[New Thread 248.316]\n" 
851,990 =thread-created,id="28",group-id="i1" 
851,991 ~"[New Thread 248.317]\n" 
851,991 =thread-created,id="29",group-id="i1" 
851,991 ~"[New Thread 248.318]\n" 
852,008 18^done,groups=[{id="i1",type="process",pid="248",cores=["0","1"]}] 
852,008 &"Cannot access memory at address 0x0\n" 
852,008 ~"0x76900924 in ??()\n" 
852,008 *stopped,frame={addr="0x76900924",func="??",args=[]},thread-id="1",stopped-threads="all",cor\ 
e="0" 
852,008 (gdb) 
852,159 19-gdb-show --thread-group i1 language 
852,189 &"Cannot access memory at address 0x80\n" 
852,189 19^done,value="auto" 
852,189 =thread-selected,id="29" 
852,189 (gdb) 
852,289 20-gdb-set --thread-group i1 language c 
852,299 20^done 
852,299 (gdb) 
852,299 21-list-thread-groups i1 
852,379 22-interpreter-exec --thread-group i1 console "p/x (char)-1" 
852,559 &"Cannot access memory at address 0x80\n" 
852,609 &"Cannot access memory at address 0x80\n" 
852,629 &"Cannot access memory at address 0x80\n" 
852,679 &"Cannot access memory at address 0x80\n" 
852,869 &"Cannot access memory at address 0x80\n" 
852,879 &"Cannot access memory at address 0x80\n" 
852,949 &"Cannot access memory at address 0x80\n" 
852,999 &"Cannot access memory at address 0x0\n" 
853,019 &"Cannot access memory at address 0x80\n" 
853,019 21^done 
853,039 (gdb) 
853,039 ~"$1 = 0xff\n" 
853,039 22^done 
853,039 (gdb) 
853,099 23-data-evaluate-expression --thread-group i1 "sizeof (void*)" 
853,109 23^done,value="4" 
853,109 (gdb) 
853,159 24-stack-info-depth --thread 1 11 
853,159 25-gdb-set --thread-group i1 language auto 
853,189 &"Cannot access memory at address 0x0\n" 
853,209 &"Cannot access memory at address 0x0\n" 
853,229 &"Cannot access memory at address 0x0\n" 
853,229 24^done,depth="2" 
853,229 (gdb) 
853,269 &"Cannot access memory at address 0x80\n" 
853,269 25^done 
853,269 =thread-selected,id="29" 
853,269 (gdb) 
853,339 26-interpreter-exec --thread-group i1 console "show endian" 
853,349 ~"The target endianness is set automatically (currently little endian)\n" 
853,349 26^done 
853,349 (gdb) 
853,839 27-dprintf-insert -f D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c:11 "Hit line %\ 
d of D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c\n" 11 
853,839 28-break-insert -f D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c:9 
853,839 29-dprintf-insert -f D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c:17 "Hit line %\ 
d of D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c\n" 17 
853,839 30-break-insert -f D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c:15 
853,849 &"No source file named D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c.\n\ 
" 
853,849 27^done,bkpt={number="1",type="dprintf",disp="keep",enabled="y",addr="<PENDING>",pending="D:\ 
\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:11",times="0",original-location="D:\ 
\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:11"} 
853,849 (gdb) 
853,849 &"No source file named D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c.\n\ 
" 
853,849 28^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending=\ 
"D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:9",times="0",original-location="\ 
D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:9"} 
853,849 (gdb) 
853,849 &"No source file named D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c.\n\ 
" 
853,849 29^done,bkpt={number="3",type="dprintf",disp="keep",enabled="y",addr="<PENDING>",pending="D:\ 
\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:17",times="0",original-location="D:\ 
\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:17"} 
853,849 (gdb) 
853,849 &"No source file named D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c.\n\ 
" 
853,849 30^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending=\ 
"D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:15",times="0",original-location=\ 
"D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:15"} 
853,849 (gdb) 
853,919 32-stack-select-frame --thread 1 0 
853,929 (gdb) 
853,949 &"Cannot access memory at address 0x0\n" 
853,949 32^done 
853,949 (gdb) 
853,969 33-gdb-set solib-search-path C:\\myProject\\HW_Libraries_DEBUG;C:\\myProject\\lib;C:\ 
\\myProject\\usr\\lib 
854,029 34-list-thread-groups --available 
854,039 35-thread-info 1 
854,429 36-stack-info-depth --thread 29 11 
854,449 &"Cannot access memory at address 0x0\n" 
854,449 37-thread-info 2 
854,659 33^done 
854,659 (gdb) 
854,659 38-thread-info 3 
854,659 39-thread-info 4 
854,719 34^done 
854,719 (gdb) 
854,729 40-thread-info 5 
854,729 41-stack-list-frames --thread 1 
854,759 35^done 
854,759 (gdb) 
854,759 42-gdb-set dprintf-style call 
854,759 43-list-thread-groups 
855,430 36^done,depth="6" 
855,430 (gdb) 
855,520 37^done 
855,530 (gdb) 
855,530 44-thread-select 29 
855,530 45-thread-info 29 
855,600 38^done 
855,600 (gdb) 
855,600 46-thread-info 24 
855,600 47-thread-info 25 
855,680 39^done 
855,680 (gdb) 
855,680 48-thread-info 26 
855,680 49-thread-info 27 
855,748 40^done 
855,748 (gdb) 
855,748 50-thread-info 28 
855,748 51-thread-select 29 
855,798 &"Cannot access memory at address 0x0\n" 
855,828 &"Cannot access memory at address 0x0\n" 
855,828 41^done 
855,828 (gdb) 
855,828 42^done 
855,828 (gdb) 
855,918 43^done 
855,918 (gdb) 
855,918 52source C:\\myProject\\.gdbinit 
855,979 44^done 
855,979 (gdb) 
856,019 45^done 
856,019 (gdb) 
856,119 46^done 
856,119 (gdb) 
856,219 47^done 
856,219 (gdb) 
856,309 48^done 
856,309 (gdb) 
856,409 49^done 
856,409 (gdb) 
856,509 50^done 
856,509 (gdb) 
856,539 51^done 
856,539 (gdb) 
856,539 &"source C:\\\\myProject\\\\.gdbinit\n" 
856,539 52^done 
856,539 (gdb) 
856,549 53-gdb-set target-async off 
856,559 53^error,msg="Cannot change this setting while the inferior is running." 
856,559 (gdb) 
856,589 54-stack-select-frame --thread 1 0 
856,639 54^done 
856,639 (gdb) 
862,956 55-thread-info 6 
862,956 56-thread-info 7 
862,956 57-thread-info 8 
862,956 58-thread-info 9 
862,956 59-thread-info 10 
862,956 60-stack-list-locals --thread 1 --frame 0 1 
863,076 55^done 
863,076 (gdb) 
863,176 56^done 
863,176 (gdb) 
863,287 57^done 
863,287 (gdb) 
863,387 58^done 
863,387 (gdb) 
863,487 59^done 
863,487 (gdb) 
863,487 60^done 
863,487 (gdb) 
863,768 61-exec-continue --thread 1 
863,820 61^running 
863,820 *running,thread-id="all" 
863,820 (gdb) 
863,940 62-thread-select 1 
864,950 =library-loaded,id="/home/root/libtestOne.so",target-name="/home/root/libtestOne.so",host-na\ 
me="C:\\myProject\\HW_Libraries_DEBUG\\libtestOne.so",symbols-loaded="0",thread-group="i1" 
865,050 =breakpoint-modified,bkpt={number="1",type="dprintf",disp="keep",enabled="y",addr="0x625595e\ 
6",func="Hello",file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOn\ 
e.c",line="11",thread-groups=["i1"],times="0",original-location="D:\\\\Workspace\\\\Oxygen\\\\runtim\ 
e-DevWS\\\\testOne\\\\testOne.c:11"} 
865,050 &"Error in re-setting breakpoint 1: Format string required\n" 
865,050 =breakpoint-modified,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x6255\ 
95dc",func="Hello",file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\tes\ 
tOne.c",line="9",thread-groups=["i1"],times="0",original-location="D:\\\\Workspace\\\\Oxygen\\\\runt\ 
ime-DevWS\\\\testOne\\\\testOne.c:9"} 
865,060 =breakpoint-modified,bkpt={number="3",type="dprintf",disp="keep",enabled="y",addr="0x6255960\ 
e",func="Hello1",file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testO\ 
ne.c",line="17",thread-groups=["i1"],times="0",original-location="D:\\\\Workspace\\\\Oxygen\\\\runti\ 
me-DevWS\\\\testOne\\\\testOne.c:17"} 
865,060 &"Error in re-setting breakpoint 3: Format string required\n" 
865,060 =breakpoint-modified,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x6255\ 
9604",func="Hello1",file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\te\ 
stOne.c",line="15",thread-groups=["i1"],times="0",original-location="D:\\\\Workspace\\\\Oxygen\\\\ru\ 
ntime-DevWS\\\\testOne\\\\testOne.c:15"} 
865,180 =breakpoint-modified,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x6255\ 
95dc",func="Hello",file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\tes\ 
tOne.c",line="9",thread-groups=["i1"],times="1",original-location="D:\\\\Workspace\\\\Oxygen\\\\runt\ 
ime-DevWS\\\\testOne\\\\testOne.c:9"} 
865,210 ~"\nBreakpoint " 
865,210 ~"2, Hello() at ..\\testOne.c:9\n" 
865,210 ~"9\t\tputs(\"Hello World\");\n" 
865,210 *stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame={addr="0x625595dc",func="Hello\ 
",args=[],file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c",l\ 
ine="9"},thread-id="1",stopped-threads="all",core="0" 
865,210 (gdb) 
865,240 62^done,new-thread-id="1",frame={level="0",addr="0x625595dc",func="Hello",args=[],file="..\\\ 
testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c",line="9"} 
865,240 (gdb) 
865,310 63-stack-info-depth --thread 1 11 
865,610 63^done,depth="4" 
865,610 (gdb) 
865,620 64-stack-select-frame --thread 1 0 
865,630 65-list-thread-groups 
865,630 66-thread-info 1 
865,630 64^done 
865,630 (gdb) 
865,680 67-stack-list-frames --thread 1 
865,700 65^done,groups=[{id="i1",type="process",pid="248",cores=["0","1"]}] 
865,700 (gdb) 
865,700 68-stack-list-locals --thread 1 --frame 0 1 
865,700 69-thread-info 2 
865,740 66^done,threads=[{id="1",target-id="Thread 248.248",frame={level="0",addr="0x625595dc",func=\ 
"Hello",args=[],file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOn\ 
e.c",line="9"},state="stopped",core="0"}] 
865,740 (gdb) 
865,740 67^done 
865,740 (gdb) 
865,740 70-thread-info 3 
865,740 71-thread-info 4 
865,740 68^done,locals=[] 
865,740 (gdb) 
865,740 72-thread-info 5 
865,740 73-thread-info 6 
865,750 74-thread-info 7 
865,750 75-thread-info 8 
865,830 69^done 
865,830 (gdb) 
865,930 70^done 
865,930 (gdb) 
866,021 71^done 
866,021 (gdb) 
866,111 72^done 
866,111 (gdb) 
866,201 73^done 
866,211 (gdb) 
866,291 74^done 
866,291 (gdb) 
866,381 75^done 
866,381 (gdb) 
874,136 76-stack-list-frames --thread 1 
874,296 76^done 
874,296 (gdb) 
880,747 77-exec-continue --thread 1 
880,797 77^running 
880,797 *running,thread-id="all" 
880,797 (gdb) 
880,817 78-thread-select 1 
880,867 =breakpoint-modified,bkpt={number="1",type="dprintf",disp="keep",enabled="y",addr="0x625595e\ 
6",func="Hello",file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOn\ 
e.c",line="11",thread-groups=["i1"],times="1",original-location="D:\\\\Workspace\\\\Oxygen\\\\runtim\ 
e-DevWS\\\\testOne\\\\testOne.c:11"} 
880,977 =breakpoint-modified,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x6255\ 
9604",func="Hello1",file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\te\ 
stOne.c",line="15",thread-groups=["i1"],times="1",original-location="D:\\\\Workspace\\\\Oxygen\\\\ru\ 
ntime-DevWS\\\\testOne\\\\testOne.c:15"} 
881,008 ~"\nBreakpoint " 
881,008 ~"4, Hello1() at ..\\testOne.c:15\n" 
881,008 ~"15\t\tputs(\"Hello World\");\n" 
881,008 *stopped,reason="breakpoint-hit",disp="keep",bkptno="4",frame={addr="0x62559604",func="Hello\ 
1",args=[],file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testOne.c",\ 
line="15"},thread-id="1",stopped-threads="all",core="0" 
881,008 (gdb) 
881,018 79-stack-info-depth --thread 1 11 
881,048 78^done 
881,048 (gdb) 
881,138 79^done,depth="4" 
881,138 (gdb) 
881,138 80-stack-select-frame --thread 1 0 
881,148 81-list-thread-groups 
881,148 80^done 
881,148 (gdb) 
881,148 82-thread-info 1 
881,159 83-stack-list-frames --thread 1 
881,190 81^done 
881,190 (gdb) 
881,250 82^done 
881,250 (gdb) 
881,250 83^done 
881,250 (gdb) 
905,719 84-exec-continue --thread 1 
905,769 84^running 
905,769 *running,thread-id="all" 
905,769 (gdb) 
905,789 85-thread-select 1 
905,849 =breakpoint-modified,bkpt={number="3",type="dprintf",disp="keep",enabled="y",addr="0x6255960\ 
e",func="Hello1",file="..\\testOne.c",fullname="D:\\Workspace\\Oxygen\\runtime-DevWS\\testOne\\testO\ 
ne.c",line="17",thread-groups=["i1"],times="1",original-location="D:\\\\Workspace\\\\Oxygen\\\\runti\ 
me-DevWS\\\\testOne\\\\testOne.c:17"} 
906,060 =library-unloaded,id="/home/root/libtestOne.so",target-name="/home/root/libtestOne.so",host-\ 
name="C:\\myProject\\HW_Libraries_DEBUG\\libtestOne.so",thread-group="i1" 
906,060 =breakpoint-modified,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="<PENDI\ 
NG>",pending="D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:9",thread-groups=["\ 
i1"],times="1",original-location="D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c\ 
:9"} 
906,060 &"warning: Temporarily disabling breakpoints for unloaded shared library \"C:\\myProject\ 
\\HW_Libraries_DEBUG\\libtestOne.so\"\n" 
906,060 =breakpoint-modified,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="<PENDI\ 
NG>",pending="D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.c:15",thread-groups=[\ 
"i1"],times="1",original-location="D:\\\\Workspace\\\\Oxygen\\\\runtime-DevWS\\\\testOne\\\\testOne.\ 
c:15"} 
912,313 86-target-detach i1 
912,313 ~"\nProgram received signal " 
912,313 ~"SIGINT, Interrupt.\n" 
912,323 ~"Cannot remove breakpoints because program is no longer writable.\nFurther execution is pro\ 
bably impossible.\n" 
912,353 (gdb) 
912,403 87-stack-info-depth --thread 1 11 
912,423 (gdb) 
912,433 =thread-exited,id="29",group-id="i1" 
912,433 =thread-exited,id="28",group-id="i1" 
912,433 =thread-exited,id="27",group-id="i1" 
912,433 =thread-exited,id="26",group-id="i1" 
912,433 =thread-exited,id="25",group-id="i1" 
912,433 =thread-exited,id="24",group-id="i1" 
912,433 =thread-exited,id="23",group-id="i1" 
912,433 =thread-exited,id="22",group-id="i1" 
912,433 =thread-exited,id="21",group-id="i1" 
912,433 =thread-exited,id="20",group-id="i1" 
912,433 =thread-exited,id="19",group-id="i1" 
912,433 =thread-exited,id="18",group-id="i1" 
912,433 =thread-exited,id="17",group-id="i1" 
912,433 =thread-exited,id="16",group-id="i1" 
912,433 =thread-exited,id="15",group-id="i1" 
912,433 =thread-exited,id="14",group-id="i1" 
912,433 =thread-exited,id="13",group-id="i1" 
912,433 =thread-exited,id="12",group-id="i1" 
912,433 =thread-exited,id="11",group-id="i1" 
912,433 =thread-exited,id="10",group-id="i1" 
912,433 =thread-exited,id="9",group-id="i1" 
912,433 =thread-exited,id="8",group-id="i1" 
912,433 =thread-exited,id="7",group-id="i1" 
912,433 =thread-exited,id="6",group-id="i1" 
912,433 =thread-exited,id="5",group-id="i1" 
912,433 =thread-exited,id="4",group-id="i1" 
912,433 =thread-exited,id="3",group-id="i1" 
912,433 =thread-exited,id="2",group-id="i1" 
912,433 =thread-exited,id="1",group-id="i1" 
912,433 =thread-group-exited,id="i1" 
912,433 86^done 
912,433 (gdb) 
912,433 87^error,msg="Invalid thread id: 1" 
912,434 (gdb) 
912,494 88-stack-list-frames --thread 1 0 10 
912,494 88^error,msg="Invalid thread id: 1" 
912,494 (gdb) 
912,494 89-stack-info-depth --thread 1 
912,494 89^error,msg="Invalid thread id: 1" 
912,494 (gdb) 
912,494 90-stack-list-frames --thread 1 
912,504 90^error,msg="Invalid thread id: 1" 
912,504 (gdb) 
912,514 91-stack-select-frame --thread 1 0 
912,514 91^error,msg="Invalid thread id: 1" 
912,514 (gdb) 
912,514 92-stack-list-frames --thread 1 0 0 
912,514 93-stack-info-depth --thread 1 2 
912,524 92^error,msg="Invalid thread id: 1" 
912,524 (gdb) 
912,524 94-list-thread-groups i1 
912,534 93^error,msg="Invalid thread id: 1" 
912,534 (gdb) 
912,534 95-stack-list-frames --thread 1 0 1 
912,534 94^done,threads=[] 
912,534 (gdb) 
912,534 95^error,msg="Invalid thread id: 1" 
912,534 (gdb) 
912,626 96-list-thread-groups 
912,626 97-thread-info 1 
912,626 98-list-thread-groups 
912,646 96^done,groups=[{id="i1",type="process"}] 
912,646 (gdb) 
912,656 97^done,threads=[] 
912,656 (gdb) 
912,666 98^done,groups=[{id="i1",type="process"}] 
912,666 (gdb) 
912,686 99-stack-list-arguments --thread 1 1 
912,686 100-stack-list-locals --thread 1 --frame 0 1 
912,696 99^error,msg="Invalid thread id: 1" 
912,696 (gdb) 
912,696 101-stack-list-arguments --thread 1 0 
912,696 100^error,msg="Invalid thread id: 1" 
912,696 (gdb) 
912,696 102-stack-list-locals --thread 1 --frame 0 0 
912,696 101^error,msg="Invalid thread id: 1" 
912,696 (gdb) 
912,696 102^error,msg="Invalid thread id: 1" 
912,696 (gdb) 
913,016 103-gdb-exit 
913,026 103^exit 

回答

0

后来我计算出格式字符串参数是在我使用gdb版本7.12时传递的。我之前使用的gdb不支持此功能。