Posted by bianbian on 2007-09-18 22:13
本文Tags: C#, GDB, Linux, 调试
还是比较厉害的,比较准。
编译的时候加入 -g -rdynamic 选项,之后就可以跑调试了:
linux $ gcc -g -rdynamic -o error error.c
linux $ gdb error
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “i686-pc-linux-gnu”…Using host libthread_db library “/lib/libthread_db.so.1″.
(gdb) run
Starting program: /home/linux/error
Program received signal SIGSEGV, Segmentation fault.
错误内容
行数 源码;
(gdb) kill
(gdb) q
linux $
标签:
C#,
GDB,
Linux,
调试遵守创作共用协议,转载请链接形式注明来自
http://bianbian.org 做人要厚道
相关日志
Posted in C/C++, Linux, Technology | 1 Comment »
Posted by bianbian on 2007-09-17 02:10
本文Tags: Linux, slackware, 内核, 编译
啊,太痛苦了,从下午一直编译到凌晨,终于每个选项都搞清楚了是干嘛的。用的是最新的2.6.22.6内核。
slackware 12.0太好玩了,装好后有几个cpu就会在屏幕上方显示几个LOGO企鹅。一排八个真壮观。。。。
推荐这个文章: http://lamp.linux.gov.cn/Linux/kernel_options.html
共计遇到的主要问题如下:
1)LILO 不能装到MBR,好像做了raid的都不能写MBR。手动写lilo.conf可以解决。(从安装盘引导,mount /dev/cciss/盘 /d1,chroot /d1,然后就可以改 /etc/lilo.conf了,改完直接lilo)
2)make menuconfig报错。类似:
scripts/lxdialog/dialog.h:127: syntax error before “use_colors”
scripts/lxdialog/dialog.h:127: warning: type defaults to `int’ in declaration of `use_colors’
scripts/lxdialog/dialog.h:127: warning: data definition has no type or storage class
scripts/lxdialog/dialog.h:128: syntax error before “use_shadow”
scripts/lxdialog/dialog.h:128: warning: type defaults to `int’ in declaration of `use_shadow’
scripts/lxdialog/dialog.h:128: warning: data definition has no type or storage class
scripts/lxdialog/dialog.h:130: syntax error before “attributes”
原因是setup装系统的时候有make menuconfig要用到的开发语言和库没有安装进去。重新安装就可以了。网上其他发行版说的需要手动安装libncurses-dev,在Slackware 12.0并不需要,系统应该自带了。
3)网络不通。检查是驱动选错了。(lspci得到的结果不能全相信,仅供参考!我最后是从安装盘里的默认系统开机自检画面里面发现真实网卡驱动的)
4)VFS: cannot open root device。
可能的原因:A)尽管硬盘全都是SCSI,常规IDE里”INCLUDE IDE/ATA disk Support”这个还是得选上。否则就打不开根设备。。。- -!
B)Enable the block layer(块设备支持,使用硬盘/USB/SCSI设备者必选)-》Support for Large Block Devices(仅在使用大于2TB的块设备时需要)。这个选项我发现必须选上。尽管我只有8*140G,不到2T。但是实际上如果这个选项没有选的话可能起不来。因此我觉得这里是翻译有问题。原文并没有指明是2T。
可能还有其他选项上的问题,可以看看这个网址:http://kerneltrap.org/node/970
期间得到ever的大力帮助,特别感谢。
今天还是嘘嘘生日,真是对不住哦。。。。
标签:
Linux,
slackware,
内核,
编译遵守创作共用协议,转载请链接形式注明来自
http://bianbian.org 做人要厚道
相关日志
Posted in Linux, Technology | 1 Comment »
Posted by bianbian on 2007-09-16 00:24
本文Tags: nginx, slackware, 编译
configure就不说了,make的时候提示:
objs/src/event/ngx_event.o(.text+0xdbc): In function `ngx_event_init_conf’:src/event/ngx_event.c:1140: warning: warning: epoll_create is not implemented and will always fail
objs/src/event/modules/ngx_epoll_module.o(.text+0×1cc): In function `ngx_epoll_add_event’:src/event/modules/ngx_epoll_module.c:250: warning: warning: epoll_ctl is not implemented and will always fail
objs/src/event/modules/ngx_epoll_module.o(.text+0×416): In function `ngx_epoll_process_events’:src/event/modules/ngx_epoll_module.c:402: warning: warning: epoll_wait is not implemented and will always fail
epoll是高性能网络io,居然不被系统支持,我明明用的是2.6.17的内核。于是make menuconfig,到 General setup / Configure standard kernel features 发现’Enable event poll’ 是关闭的,于是启用。
然后重新编译内核:
make bzImage
make modules
make modules_install
cp System.map /boot/
cp arch/i386/boot/bzImage /boot/vmlinuz
lilo
reboot
话说,Slackware 12.0都出来几个月了,改天我要去装一下。^_^
标签:
nginx,
slackware,
编译遵守创作共用协议,转载请链接形式注明来自
http://bianbian.org 做人要厚道
相关日志
Posted in Linux, Technology | 1 Comment »
Posted by bianbian on 2007-09-05 02:56
本文Tags: 无线
20块钱买了张破pc卡(说是驱动装不上)
买来试试吧,破笔记本正好闲着发霉
果然是一万年前的卡,Hawking 11M Ethernet WLAN PC CARD
还好这个hawking的主页上有这个驱动:http://www.hawkingtech.com/support/details.php?CatID=33&FamID=102&ProdID=48
不过呢,这个破驱动默认是装不了的。。。。。
用了很多种方法后(甚至去把驱动的INF文件给改了。。。就差没写驱动了)
最后发现手动选硬件型号,在Mireless manufacturer里选 WLEN PC v3.0可以骗windows装上
然后测试,还是连不上。差点放弃,先去游泳了。
不过后来想想估计是现在54M路由(IEEE802.11g)的PSK加密不支持,于是把路由器的加密方式改为WEP
重新测试,能检测到无线信号了,不过还是ping不通
哀,,,,这时候已经2点了,我都绝望了
最后突然一想,会不会这个sb连WEP加密也不会啊
于是把所有加密给关了
哈哈,于是ping了一下,上来发个贴
最后说一句,古老的硬件最好不要用了,写这个破流水卡了2次,太不稳定了
不过为了这个古董搞得加密也没了。还好家里无线设备不多,就4个,明天一个一个加允许MAC吧。。。。。
标签:
无线遵守创作共用协议,转载请链接形式注明来自
http://bianbian.org 做人要厚道
相关日志
Posted in Other, Technology | 2 Comments »
Posted by bianbian on 2007-08-27 19:05
本文Tags: Tp-Link, 拨号
万恶的南京电信好贵啊,,,,,我的套餐是一个月360小时,2M带宽,168元/月
路由器不可能一直联网,需要手动拨号。不过每次都连上192.168.1.1也太麻烦了。
于是写了个程序自动拨号、断开。程序启动就会连上路由器拨号,关闭的时候会断开连接。

需要的朋友请下载(仅适用于TP-Link路由器):tp_link.zip
标签:
Tp-Link,
拨号遵守创作共用协议,转载请链接形式注明来自
http://bianbian.org 做人要厚道
相关日志
Posted in Delphi, Technology | No Comments »