zlgopen / awtk-linux-fb

awtk port for linux framebuffer
108 stars 49 forks source link

how to do debug breakpoint #85

Open fatalfeel opened 2 years ago

fatalfeel commented 2 years ago

as title i want to break at a line and see the variable value

fatalfeel commented 2 years ago

done.

https://www.mediafire.com/view/vi5fojxvh99vdxi/awtk_demo.png

  1. gdb debug [option] gedit ./awtk_config.py OS_FLAGS='-Wall -Os -fno-strict-aliasing ' ~change to OS_FLAGS='-Wall -fno-strict-aliasing '

gedit ./SConstruct env = DefaultEnvironment( ENV = os.environ, CCFLAGS = awtk.CCFLAGS + APP_CCFLAGS + ' -O0 -g', #########add this by stone######### CFLAGS = awtk.CFLAGS + ' -O0 -g', #########add this by stone######### CC=awtk.CC, CXX=awtk.CXX, LD=awtk.LD, AR=awtk.AR, RANLIB=awtk.RANLIB, STRIP=awtk.STRIP, LIBS = awtk.LIBS, LIBPATH = awtk.LIBPATH, CPPPATH = awtk.CPPPATH + [awtk.joinPath(awtk.TK_ROOT, 'res')], LINKFLAGS = awtk.LINKFLAGS, OS_SUBSYSTEM_CONSOLE=awtk.OS_SUBSYSTEM_CONSOLE, OS_SUBSYSTEM_WINDOWS=awtk.OS_SUBSYSTEM_WINDOWS )

~in target root@NVTEVM:~/release/bin$ arm-ca9-linux-gnueabihf-gdbserver :5039 ./demoui

~in x86 pc (gdb) target remote 192.168.0.4:5039

fatalfeel commented 2 years ago

if in eclipse u need gdb command before debug

set solib-absolute-prefix /root/nt9832x/na51068_sdk_nand/gui/awtk-linux-fb

set solib-search-path /opt/ivot/arm-ca9-linux-gnueabihf-6.5/arm-ca9-linux-gnueabihf/sysroot/lib:/opt/ivot/arm-ca9-linux-gnueabihf-6.5/arm-ca9-linux-gnueabihf/sysroot/usr/lib:/root/nt9832x/na51068_sdk_nand/gui/awtk-linux-fb/lib:/root/nt9832x/na51068_sdk_nand/gui/awtk-linux-fb/bin

xianjimli commented 2 years ago

好的,谢谢。

fatalfeel commented 2 years ago

for u debug my man~using eclipse Luna SR2 and openjdk 8 http://fatalfeel.blogspot.com/2013/12/awtk-framebuffer-gui.html

fatalfeel commented 2 years ago

very good~~~ https://www.zlg.cn/index/pub/awtk.html

xianjimli commented 2 years ago

谢谢支持

fatalfeel commented 2 years ago

most arm target support tftp upload this is a sample may be you can use it~ https://fatalfeel.blogspot.com/2013/12/build-tftp-upload-to-ipmi-board.html

xianjimli commented 2 years ago

好的,谢谢。