我在stm32上使用了一个名为LVGL的第三方图形库,但我在调试时遇到了一个问题,它可以正常运行并成功下载到板子中。我在Visual Studio Community 2022上通过visualGDB调试了这个问题。问题上诉很困惑。当我在库的文件上设置断点时显示调试错误,我注意到只是等待几分钟,然后我单击 IDE 的下一步按钮进入函数然后发生错误.或者调试久了就会报错。我在网上找了好久。但是没有用。请帮助或尝试提供一些想法如何实现这一目标。
这是来自VisualGDB命令行的错误gdb日志。日志太长,所以我通过比较正确的和错误的日志来截取错误日志以获取此日志。 你可以看到我在文件lv_task.c的第96行设置了一个断点,然后我等了几分钟,当我点击下一步调试器按钮时就会发生错误。
^done,stack-args=[frame={level="0",args=[]},frame={level="1",args=[]},frame={level="2",args=[]},frame={level="3",args=[]}]
-stack-select-frame 0
^done
-thread-select 1
^done,new-thread-id="1",frame={level="0",addr="0x0801b824",func="lv_task_handler",args=[],file="../User_code/Lvgl/lvgl/src/lv_misc/lv_task.c",fullname="D:\\LVGLWork\\Module_gui\\Project\\User_code\\Lvgl\\lvgl\\src\\lv_misc\\lv_task.c",line="96",arch="armv7e-m"}
-exec-next
^running
*running,thread-id="all"
*stopped,reason="end-stepping-range",frame={addr="0x053ef158",func="??",args=[],arch="armv7e-m"},thread-id="1",stopped-threads="all"
-data-list-register-values r-10
^done,register-values=[{number="0",value="0x053ef158"},{number="1",value="0x053ef158"},{number="2",value="0x053ef158"},{number="3",value="0x053ef158"},{number="4",value="0x053ef158"},{number="5",value="0x053ef158"},{number="6",value="0x053ef158"},{number="7",value="0x053ef158"},{number="8",value="0x053ef158"},{number="9",value="0x053ef158"},{number="10",value="0x053ef158"},{number="11",value="0x053ef158"},{number="12",value="0x053ef158"},{number="13",value="0x053ef158"},{number="14",value="0x053ef158"},{number="15",value="0x053ef158"},{number="25",value="0x053ef158"},{number="91",value="0x02570000"},{number="92",value="0x053eaf30"},{number="93",value="0x00000000"},{number="94",value="0x00000000"},{number="95",value="0x00000000"},{number="96",value="0x00000000"},{number="97",value="0x053eaf30"},{number="98",value="0x00000000"},{number="99",value="0x00000000"},{number="100",value="0x00000000"},{number="101",value="0x00000000"},{number="102",value="0x00000000"},{number="103",value="0x00000000"},{number="104",value="0x00000000"},{number="105",value="0x00000000"},{number="106",value="0x00000000"},{number="107",value="0x00000000"},{number="108",value="0x00000000"},{number="109",value="0x00000000"},{number="110",value="0x00000000"},{number="111",value="0x00000000"},{number="112",value="0x00000000"},{number="113",value="0x00000000"},{number="114",value="0x00000000"},{number="115",value="0x00000000"},{number="116",value="0x00000000"},{number="117",value="0x00000000"},{number="118",value="0x00000000"},{number="119",value="0x00000000"},{number="120",value="0x00000000"},{number="121",value="0x00000000"},{number="122",value="0x00000000"},{number="123",value="0x00000000"},{number="124",value="0x00000000"},{number="125",value="0x00000000"},{number="126",value="0x00000000"},{number="127",value="0x00000000"},{number="128",value="0x00000000"},{number="129",value="0x00000000"},{number="130",value="0x0000000000000000"},{number="131",value="0x0000000000000000"},{number="132",value="0x0000000000000000"},{number="133",value="0x0000000000000000"},{number="134",value="0x0000000000000000"},{number="135",value="0x0000000000000000"},{number="136",value="0x0000000000000000"},{number="137",value="0x0000000000000000"},{number="138",value="0x0000000000000000"},{number="139",value="0x0000000000000000"},{number="140",value="0x0000000000000000"},{number="141",value="0x0000000000000000"},{number="142",value="0x0000000000000000"},{number="143",value="0x0000000000000000"},{number="144",value="0x0000000000000000"},{number="145",value="0x0000000000000000"}]
-stack-list-frames --thread 1
^done,stack=[frame={level="0",addr="0x053ef158",func="??",arch="armv7e-m"}]
-stack-list-arguments --thread 1 0
^done,stack-args=[frame={level="0",args=[]}]
info symbol 0x53ef157
&"info symbol 0x53ef157\n"
~"No symbol matches 0x53ef157.\n"
^done
info symbol 0x53ef155
&"info symbol 0x53ef155\n"
~"No symbol matches 0x53ef155.\n"
^done
info symbol 0x53ef14e
&"info symbol 0x53ef14e\n"
~"No symbol matches 0x53ef14e.\n"
^done
info symbol 0x53ef0f4
&"info symbol 0x53ef0f4\n"
~"No symbol matches 0x53ef0f4.\n"
^done
x/31i 0x53ef158
&"x/31i 0x53ef158\n"
~"=> 0x53ef158:\t"
&"Cannot access memory at address 0x53ef158\n"
^error,msg="Cannot access memory at address 0x53ef158"
x/31i 0x53ef158
&"x/31i 0x53ef158\n"
~"=> 0x53ef158:\t"
&"Cannot access memory at address 0x53ef158\n"
^error,msg="Cannot access memory at address 0x53ef158"
我试图找到GDB handscripts来找出程序中发生了什么。在我有限的GDB调试经验中,我对复杂的GDB命令感到困惑。visual studio只是给我一个内存访问错误,我该怎么办下一步?