gdb调试c语言在poll函数卡住,交叉编译gdb,调试时出现几个搞不明白的问题

编程入门 行业动态 更新时间:2024-10-15 08:19:19

gdb调试c语言在poll函数卡住,交叉编译gdb,调试时出现<a href=https://www.elefans.com/category/jswz/34/1769605.html style=几个搞不明白的问题"/>

gdb调试c语言在poll函数卡住,交叉编译gdb,调试时出现几个搞不明白的问题

我使用的Ubuntu系统

#uname -r

2.6.32-21-generic

#lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description:    Ubuntu 10.04 LTS

Release:        10.04

Codename:       lucid

1.下载gdb7.5

2.下载ncurses-5.8  (gdb7.5依赖ncurses,所以需要先编译ncurses)

3.编译ncurses 然后把生成库文件和头文件拷贝到 arm-vfp_uclibc-linux-gnu-gcc 相应的库目录和头文件目录

(1)先配置编译选项

./configure --prefix=/mnt/nfs/tmp/ncurses-5.8/out \

--host=arm-vfp_uclibc-linux-gnu \

CC=/opt/hisi-linux/x86-arm/gcc-3.4.3-csl-uClibc-0.9.30-softvfp/bin/arm-vfp_uclibc-linux-gnu-gcc

(2)make

(3)cp

4.编译gdb7.5

(1)先配置编译选项

../gdb-7.5/configure \

--host=arm-vfp_uclibc-linux-gnu \

--target=arm-vfp_uclibc-linux-gnu \

CC=/opt/hisi-linux/x86-arm/gcc-3.4.3-csl-uClibc-0.9.30-softvfp/bin/arm-vfp_uclibc-linux-gnu-gcc \

--without-x --disable-gdbtk --disable-tui --without-included-gettext --without-included-regex  --enable-static \

--program-prefix=arm-hi3110-v200- \

--prefix=/mnt/nfs/tmp/gdb-7.5/out

(2)make&&make install

(3)arm-vfp_uclibc-linux-gnu-strip arm-hi3110-v200-gdb

5.使用gdb调试

# ./arm-hi3110-v200-gdb myapp

GNU gdb (GDB) 7.5

Copyright (C) 2012 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "arm-vfp_uclibc-linux-gnu".

For bug reporting instructions, please see:

...

Reading symbols from /mnt/tmp/MainCode/code/bin/out/skyapp...done.

(gdb) r

Starting program: /mnt/tmp/MainCode/code/bin/out/skyapp

sk_test_find_flash_mtd mtd=mtd0, name=loader,mtd_size=0xb0000

[sk_test_find_flash_mtd 93]

sk_test_find_flash_mtd mtd=mtd1, name=logo,mtd_size=0x20000

[sk_test_find_flash_mtd 93]

sk_test_find_flash_mtd mtd=mtd2, name=hwconfig,mtd_size=0x20000

[sk_test_find_flash_mtd 93]

sk_check_flash_factory_flag mtd=/dev/mtd/2,hwcfg_size=0x20000,hwcfg_addr=0xd0000

[sk_check_flash_factory_flag 164]

[{I} 04:49:29.169]: svn path is svn://192.168.0.246/sw01_hi3110/Platform_hi3110_V200/trunk/LibCode [print_svn_info_libcode 31]

[{I} 04:49:29.170]: svn version is 4717 [print_TunerPort[0],u8i2caddr[0xc0],u32tuner_id=c74a,4819

svn_info_libcode 32]

[{I} 04:4TunerPort[0],u8i2caddr[0xc0],u32tuner_id=474a,4819

9:29.171]: SK_HDI_BSP_V00.00.10-Aug 20 2[17369199 FATAL-ecs]:[tda18250_init_tuner - 386] __file__:/home/drteam/hehuachao/hi3110e_v200/Hi3110EV200R001C00SPC042/code/ecs/drv/tuner/tuner/tda18250/tda18250.c,__function__:tda18250_init_tuner, __line__:386

015[sk_hdi_bsp_init 415]

[{I} 04:49:29.196]: find tuner[0] at tuner poart[0], i2c addr=0xc0

[hi_adp_Tuner_Init 305]

Program received signal SIG32, Real-time event 32.

0x008342bc in sigsuspend ()

(gdb) bt

#0  0x008342bc in sigsuspend ()

#1  0x008089c4 in __pthread_wait_for_restart_signal ()

#2  0x00808f1c in pthread_create ()

#3  0x0076a424 in sk_task_create (p_task_id=0xbec619b8,

p_task_name=0x10ca108 "TunerMonitorTask",

task_pfn=0x75e434 , p_param=0x0, p_stack=0x0,

stack_size=36864, priority=64)

at /mnt/nfs/heb_hi3110ev200_pro/MainCode/code/src/skos/src/linux/skyapi_task.c:387

#4  0x0075dac8 in hi_adp_Tuner_Init ()

#5  0x00733fb0 in sk_hdi_dmd_init ()

#6  0x0071ab74 in sk_sys_init ()

at /mnt/nfs/heb_hi3110ev200_pro/MainCode/code/src/sksys/src/sk_sys.c:256

#7  0x0070f5c0 in udi_init ()

at /mnt/nfs/heb_hi3110ev200_pro/MainCode/code/src/csudi/cs_udi_input/src/cs_udi_input.c:705

#8  0x00008200 in main (argc=1, argv=0xbec61e14)

at /mnt/nfs/heb_hi3110ev200_pro/MainCode/code/src/main/app_main.c:66

(gdb)

(gdb) handle SIG32 nostop noprint     //通过handle SIG32 nostop noprint 可以忽略该信号,让程序继续运行

Signal        Stop      Print   Pass to program Description

SIG32         No        No      Yes             Real-time event 32

(gdb) c

Continuing.

[{I} 04:51:47.770]: fd650 bitlevel=0x0

[hi_adp_>>>>keyled_dev_type=0x0

key_Init 647]

Receive command: mode==0 timeout==2000 length==14 command==killall udhcpc

killall: udhcpc: no process killed

before response!

finish command for sync!

[{I} 04:51:48.002]: init gfx defmmz_userdev:ioctl_mmb_alloc: hil_mmb_alloc(higo, 4096, 0x00000004, 0, png) failed!

ault_color_type = 1

[sk_hdi_gfx_init_3110 604]

mmz_userdev:ioctl_mmb_alloc: hil_mmb_alloc(higo, 4096, 0x00000004, 0, graphics) failed!

HiGo Ver:3.0.0.2 a03

This version is building at May 29 2015 11:43:54

HiGo X5V200 ADP Ver:3.0.0.2 a01

This version is building at May 29 2015 11:44:00

[{I} 04:51:48.060]: Layer info C.h:576,C.w:720;D.h:576,D.w:720;S.h:576,S[17508065 ERROR-vo]:[OsdOsiInit - 1375] Layer 0 has created

.w:720[sk_hdi_gfx_open_3110 740]

[{I} 04:51:48.060]: Layer info colorkey:0 alpha:0xff format:1 color_type:5[sk_hdi_gfx_open_3110 741] [17508082 ERROR-vo]:[OsdOsiSetLayerResolution - 1722] osd do vertical scalling

[17508108 ERROR-vo]:[OsdOsiSetLayerResolution - 1722] osd do vertical scalling

*** [error] fun sk_hdi_av_evt_config [L 1759]not enough AvCallBack

*** [error] fun sk_hdi_av_evt_config [L 1759]not enough AvCallBack

*** [error] fun sk_hdi_av_evt_config [L 17[17508148 ERROR-vo]:[OsdOsiSetLayerResolution - 1722] osd do vertical scalling

59]not enough AvCallBack

enter cs mmcp_main();

To open file /root/ROOTFS/CoshipLog/config.txt : rUDI's problem,Should run CSUDIUSBGetCount function first, otherwise in callback may get wrong usb count! ChenHui[now usb count is 0]

To open file /root/ROOTFmmz_userdev:ioctl_mmb_alloc: hil_mmb_alloc(higo, 1658880, 0x00000004, 0, user) failed!

S/config/plugindata.properties : w+To opmmz_userdev:ioctl_mmb_alloc: en file /root/ROOTFS/config/systemdata.properties : rTo open file /root/ROOTFS/config/mmcpinit.properties : rTo open file /root/hil_mmb_alloc(higo, 1658880, 0x00000004, 0, graphics) failed!

ROOTFS/config/env.properties : rTo open file /mnt/hd/HDD0/config/Systemsetting.properties : rTo open file /root/ROOTFS/config/Systemsetting.properties : rTo open file /root/ROOTFS/config/Systemsetting.properties : rTo open file /mnt/hd/HDD0/config/amsdata.properties : rTo open file /mnt/hd/HDD0/config/MediaSetting : rTo open file /root/ROOTFS/config/MediaSetting : w+To open file /mnt/hd/HDD0/config/Systemsetting.properties : r[CSPluginStartIframe_haerbinInit,192]

[{I} 04:51:48.774]: CreateSurface succes: handle:0x4, m_pv_surface_mem:0x403d0000, bpp:32, color:9, width:720, height:576, alpha:255[sk_hdi_gfx_create_surface_hi3110 965]

[test]line 52, errorCode=0

[test]line 55, errorCode=0

[test]line 58, errorCode=0

[test]line 61, errorCode=0

To open file /mnt/hd/HDD0/config/resource.properties : rTo open file /mnt/hd/HDD0/config/start_ads.mpg : rTo open file /mnt/hd/HDD0/config/resource.properties.mmcpbak : w+To open file /mnt/hd/HDD0/config/start_ads.mpg : rTo open file /mnt/hd/HDD0/config/radio_ads.mpg : rTo open file /root/ROOTFS/config/sectiondata.properties : w+PROTOTYPE_PLUGIN----Ca_Shuma in !!!

To open file /root/ROOTFS/config/dmdata.properties : rTo open file /root/ROOTFS/config/saudata.properties : w+To open file /root/ROOTFS/config/dmdata.properties : rTo open file /mnt/hd/HDD0/data/program/version.bin : r+To open file /mnt/hd/HDD0/data/program/fixedser.bin : r+To open file /mnt/hd/HDD0/data/program/unfixedser.bin : r+To open file /mnt/hd/HDD0/data/program/batinfo.bin : r+To open file /mnt/hd/HDD0/data/program/tpc.bin : r+To open file /root/ROOTFS/config/epgdata.properties : w+To open file /root/ROOTFS/config/Systemsetting.properties : rTo open file /mnt/hd/HDD0/config/Systemsetting.properties : rTo open file /mnt/hd/HDD0/config/AdsData.properties : rTo open file /mnt/hd/HDD0/config/AdsPrivate.properties : rTo open file /root/ROOTFS/config/adsres/AdsImage34 : w+To open file /mnt/hd/HDD0/config/AdsPrivate.properties : rTo open file /mnt/hd/HDD0/config/AdsData.properties : rTo open file /mnt/hd/HDD0/config/AdsData.properties : rTo open file /mnt/hd/HDD0/config/AdsData.properties : r

[EventStatusCallBack] Start---SmcNo:0, Event:4

[New LWP 769]

Program received signal SIG33, Real-time event 33.

[Switching to LWP 769]

0x00833d6c in poll ()

(gdb) handle SIG33 nostop noprint       //通过 handle SIG33 nostop noprint 可以忽略该信号,让程序继续运行

Signal        Stop      Print   Pass to program Description

SIG33         No        No      Yes             Real-time event 33

(gdb) c

Continuing.

......................................

问题:Program received signal SIG32, Real-time event 32.

Program received signal SIG33, Real-time event 33.

这两个信号是怎么产生的?是交叉编译gdb的时候config文件配置的不对,或者是编译应用程序myapp的config配置的有问题,亦或是我的Ubuntu系统版本与gdb之间的兼容性问题?

更多推荐

gdb调试c语言在poll函数卡住,交叉编译gdb,调试时出现几个搞不明白的问题

本文发布于:2024-03-13 17:11:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1734441.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:几个   不明白   函数   语言   gdb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!