Le's profileSomething like a home pa...PhotosBlogListsMore ![]() | Help |
|
August 31 一点debug技巧怎么样打印出一个函数的stack backtrace,也就是函数的调用路径? 可以使用glibc的backtrace()/backtrace_symbols()函数,info在这里 http://www.gnu.org/software/libc/manual/html_mono/libc.html#Backtraces 这里有一段代码,可以拿去用 #include<execinfo.h> int i; void *bt[128]; int bt_size; char **bt_sym; printf("\n########## Backtrace ##########\n"); bt_size = backtrace(bt, sizeof(bt) / sizeof(void *)); printf("Number of elements in backtrace: %d\n", bt_size); bt_sym = backtrace_symbols(bt, bt_size); for (i = 0; i < bt_size; i++) { printf("%s\n", bt_sym[i]); } free(bt_sym); printf("########## Done ##########\n"); 我参考了这个 http://sources.redhat.com/ml/crossgcc/2003-02/msg00013.html 如果不幸是C++程序可以利用c++filt来得到真正的函数原型 这里有段shell代码可以拿去用: sed -e 's/[^(]\+(/c++filt /' -e 's/+0x.*$//g' | xargs -0 sh -c 还有一个gcc内建函数,gcc的扩展,也可能有用,不过只能得到返回地址 http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Return-Address.html#Return-Address August 30 Open source companies to watchAugust 29 自由软件和市场推广不可否认,自由软件,特别是没有商业公司back的自由软件的市场推广历来是个问题。 Johannes (Hanno) Böck刚刚写了一篇文章提到这个问题,下面是大意: 文章从Nvidia刚刚发布支持Xorg 7.1的商业驱动讲起 这个驱动可以说是姗姗来迟,Xorg 7.1已经发布了3个月,而Xorg 7.1的第一个的候选发布更是距今已经有5个月了。即便是这样,这个驱动仍然不支持AIGLX,这个是Xorg 7.1的重要特性。 这个驱动的发布在Linux世界里现在已是尽人皆知。 但是ati的自由驱动的发布却很少有人知道。据Hanno说,新的Ati自由驱动对R300及其以上的芯片的支持已经有了很大改善。 而且这种现象决不是孤立的。比如还有在ffmpeg支持h264很长一段时间之后,一个Hanno不记得名字的公司(译注:这就是经验啊!)说该公司为Linux带来了商业的h264编解码器。…… August 28 狂ft啊!<zhllg> d4rkstar, how can i test the "post" command? Isn't it supposed to work? why unknown keyword? It is N/A in soundcard driver? <d4rkstar> i usually search the source code for the right sintax <d4rkstar> if you can wait a minute i'll search it for you documentation差到如此程度 好在还有个活字典 August 27 rm -rf VOS[enter]rm就是remove,r是recursive,f是force…… VOS是一个伴我5年的Windows游戏 Virtula Orchestra System 一个弹琴的游戏 这个文件夹里的VOS是个绿色版本,而且打了补丁可以在XP里正确显示中文 这个文件夹里有我5年来积累的.vos文件…… 所以,敲下这几个键对我来说,不是那么简简单单的一件事情 可我也不是吃饱了撑的故意要删除它 而是经历了一次事故,导致我丢失了里面很多文件,包括主程序文件和大量的.vos 与其留着,不如一了百了,都删了算了 有几个朋友要给我留言结果没有留上 微软的这个东西有时候是有些烦人 我买了个PSP 即将来到的大连之行和下面这个消息是促使我下此决定的最后一根稻草 http://ps2dev.org/psp/Tools/Toolchain/psptoolchain-20060120 August 23 一个HPL引发的辩论首先感谢Xie Yanbo朋友给我做的广告(广告里这里有这个辩论的所有来龙去脉)。 本 来不想在这里再说什么,觉得只要看完所有内容自然会有定论 ,可后来发现还是要说两句。否则很多人恐怕会不记得辩论的缘由,或者可能根本不知道到底是怎么回事。或者可能一开始的误会便起于此。所以决定写这篇文章解 释一下软件许可协议相关的话题。小弟不才,但是对于软件许可协议稍微有些研究。通读过GPL-2, LGPL-2, GFDL, BSD等许可协议至少一遍,其中GPL/LGPL几乎只要有疑问就拿出来看。GNU网站上的GPL FAQ的内容也基本看过一遍。目前正在翻译GFDL(在我正在翻译的Programming from the ground up一书的附录中)。为写此篇文章我特意详细看了一遍HPL,发现我之前对它的理解稍有偏差,但基本不影响问题的实质。尽管如此,以下论述仍可能有疏漏之处,还望各位不吝赐教。 这个辩论由一个软件许可协议而引发。 什 么是软件许可协议?简单说就是你在发布软件时选择的授权方式。只要用了你的软件,使用者的行为就要满足你的软件所遵循的许可协议的要求。否则就违反版权 法。但要注意的是,创建一个新的许可协议,并不意味着这个新协议会影响到任何现有的软件。只要没人用这个协议来发布软件,这个协议就是废纸一张。但是如果 大家都认识到了某个软件许可协议的价值,并且使用它来发布软件的话,那么这个协议就有用了。 引起这个辩论的许可协议是HPL (Honest Public License)。不过讲这个协议之前还要费些口舌讲一下GPL(GNU General Public License)。GPL是一种开源协议,就是说以GPL发布的软件,你可以获得它的源代码,使用它,学习它,修改它,再次分发它(原封不动的或者修改后 的)。不过它有一个要求,就是只要你发布了这个软件,你就要把它的源代码一起发布(包括你做的改动,如果有的话)。但是,GPL有个漏洞,利用这个漏洞, 很多做web service的公司不将用软件提供服务视为一种软件发布的形式。所以他们即使改动了他们用来提供服务的软件,也不把改进(主要以补丁的形式)回馈给社 区。在我获得这个信息的地方,举了两个公司的例子,就是Yahoo和Google,不过也没听到这两个公司有什么反驳。 面对此种情况,Fabrizio Capobianco看不下去了,所以他提出了Honest Public License。这里有HPL的草稿,而这里是HPL 和GPL之间的差别。HPL实际上就是对GPL的一个修改,多加了一个条款,规定软件与第三方用户通过网络的交流也应为一种软件分发的方式。所以如果您用 来提供web服务的软件是以HPL发布的,而您对它作了修改,您也要将您的修改公之于众。我之前理解稍有偏差,我认为是只要修改就要发布。 Yahoo/Google就不用说了,Douban是使用开源软件来提供服务的,这一点恐怕也是没有疑问的。如果他们用来提供服务的软件都是HPL的话, 他们对这些软件所做的任何修改都要公之于众,否则就是违法。当然事实是现在还没有听说有什么软件采用了HPL(当然可能我孤陋寡闻,您要是知道,就告诉 我,我立刻改正)。所以目前所有的以开源软件提供web服务的公司,即使对他们所用来提供服务的软件做了改动而不将这些改动贡献回社区,也是没有问题的。 我发 那个文章的目的就是为了说明HPL的意义(当然有点小偏差,我前面解释了)。为了说明清楚问题,我援引了原文里的两个公司的例子。这两个公司我是直接引用(当然我应该说明出处,以后我会这样做的),所以对于这两个公司如果有疑问可以找Glyn Moody去 理论。此外我添加了douban,是想举个本地的例子,使文章更本地化一些。不过后来证实这是我最大的失误。加入douban我更着意在于强调douban的商业模式与前两者类似。说实话,关于它是否有将它所做的改进贡献回社区我确实无从知晓,我只是猜测。我只是觉得任何一个“理智”的CEO都不会做这样的事情。但这不是我的主要用意所在。无论如何,我还是对此致过歉。塞翁失马,焉知非福。以后当会吸取教训。可是不管怎样,我都没有任何责备这3家公司的意思,更何谈诋毁。我的观点是这样 的公司对开源技术的应用提高了这些技术的知名度,可以吸引更多的人来关注,学习,加快这些优秀技术的普及。至少在现阶段,我看不到任何应用HPL的必要。 我本人对HPL暂时持保留态度。 但当听说有人说他有相反的证据时,我就想知道那个证据是什么。因为按道理说,贴个邮件列表的连接轻而易举的事情。既然说有证据,那么就请贴一下,咱开开眼,说不定以后还能帮着宣传一下。可是到现在也没有看到一个证据,而且屡屡以“商业秘密”为由拒绝透露,实在令人大失所望。已经贡献的补丁还要当作是秘密,真是不知道该怎么说好。我把猜测的东西那出来说,是我不对。可是有证据不拿出来,如何说明我猜测的是错误的。不能证明我说错了,何以赖我诋毁你?这一点我是始料不及的。 至于什么“极端共产主义者”之类的,我就不多做计较了,知道实际情况是什么样的就好了。 我的bayonne2的config/Makefile.in patch被收入upstream了http://overlays.gentoo.org/proj/voip/browser/trunk/net-misc/bayonne2/files/bayonne2-1.5.26-config-Makefile.in.patch 最近刚刚放出来bayonne2-1.5.27 $ diff /var/tmp/portage/bayonne2-1.5.26/work/bayonne2-1.5.26/config/Makefile.am /var/tmp/portage/bayonne2-1.5.27/work/bayonne2-1.5.27/config/Makefile.am 15,18c15,18 < ETC=$(sysconfdir) < CONF=$(sysconfdir)/bayonne < INIT=$(sysconfdir)/init.d < LOGD=$(sysconfdir)/logrotate.d --- > ETC=$(DESTDIR)/$(sysconfdir) > CONF=$(DESTDIR)/$(sysconfdir)/bayonne > INIT=$(DESTDIR)/$(sysconfdir)/init.d > LOGD=$(DESTDIR)/$(sysconfdir)/logrotate.d 不过下次我应该直接改Makefile.am,然后加上copyright notice IRC频道是重要的#szlug on irc.freenode.net 今天#szlug来了一位来自Boston的Gentooer,他目前工作于http://www.cordiaip.com/的香港分公司 聊天的时候他正在IFC,他来#szlug只是估计Shenzhen可能会有个LUG。 他是幸运的,我一早就注册了#szlug,而且我和几个朋友正挂在上面。 如果我没有注册#szlug,或者晚注册,这个朋友可能一生都见不到了 人生就是这么有趣 缘分啊! August 20 distribution is about patch creationOMG!!! 吐血中…… 很多软件写的都只是能用而已 距我眼中的标准(其实也不苛刻,仅仅make sense而已)差的太远 Sigh!!!!!!!!! 踏着前人的足迹Anthony Fok <foka@debian.org> Fixed the shed.big5 2001.2.18 __ Anthony Fok <foka@debian.org> Translate table fix. 2001.1.8 __ Ha Shao <hashao@china.com> Add new judging functions. ;) It's better than mine. Thanks very much. 2000.8.31 -- Ha Shao <hashao@china.com> Add get option support for autoconvert -- Anthony Fok <foka@debian.org> Packaged autoconvert for debian Fix the big2gb table 有关东大的一些消息<hellwolf|Daniel> 东南大学全体浦口校区學生将于8月26日集体从浦口校区搬迁到江宁九龙湖校区,这是一次新时代长征,空前绝后,盛况空前。 <hellwolf|Daniel> hers, 还是没理解 <hers> 靠 <hers> 九龙湖? <hers> 南大浦口要孤零零了。。 <hellwolf|Daniel> 恩,鸟不拉屎的地方,我5月去视察的时候才有一班公交线路 <hers> 抓紧时间,把龙王山包下来,建成别墅区 <hers> 视察 - -! <hers> 计算机系是啥时候回本部的? <hellwolf|Daniel> 估计回不去了,上次认识一个内蒙古的一个新靠过来的研究生,好像也是到九龙湖,群魔乱舞了要 <hellwolf|Daniel> 研究生到这么远的地方,惨了 <hellwolf|Daniel> 牺牲品阿,一期工程才刚好 <hellwolf|Daniel> 建议他早点走人,东大没啥好的 <zhllg> 九龙湖在什么地方 <hellwolf|Daniel> 对学校来说,花几年建立一个新校区只是历史上的一瞬,但学生一生才念几年书,不应该成为牺牲品。 在江宁 <de_dustyciti> 这两天还在感慨,g++ 的速度好像也不至于反胃。。忽然发现,gcc 编译 C 的速度比 g++ 编译 cpp 速度快了不是一点。。。 <de_dustyciti> 江宁。。 <hellwolf|Daniel> 我从小到大念的学校都赶上改造了 <hellwolf|Daniel> TMD,人走的时候新的东西就建好了 <zhllg> 估计也差不多,记得有一次回去,有个老师和我说南大没有在江宁捞到地盘,是么 <hellwolf|Daniel> 南大和东大要合并了,这次是真的 <zhllg> de_dustyciti, 南京人? <zhllg> 啊? <zhllg> 哎,本来就是一家人,早该和了 <de_dustyciti> 有没有消息说全部划归南师大? <hers> Huahua~ 不认识那个家伙,不过我觉得你该把 LJ 里那件事情说明下 <de_dustyciti> zhllg 跟南京也有一腿? <zhllg> 东南大学 <hellwolf|Daniel> 顾冠群和南大那个老大已经被体面解职了 <hers> 这里都是南京帮。我也是南京的啊啊啊啊~~ <hellwolf|Daniel> 政府已经彻底扫除了障碍 <zhllg> 他们俩有矛盾? <de_dustyciti> /go 就我不是 <hellwolf|Daniel> 他们俩有矛盾是小事,政府铁了心,谁也组织不了 <hers> 据百合上分析,两人的离职陈述都相当体面 <hellwolf|Daniel> 阻止 <hers> 南京大学的校长有着党外人士的传统。。不知道合并之后会不会改变 <hellwolf|Daniel> 全国大学都在搞综合 * hers 最喜欢这种八卦 <de_dustyciti> 中国迟早出一批世界一级巨大的学校。。 <hellwolf|Daniel> 结果就是越来越不象样 <hellwolf|Daniel> 以前到专职的学校有很多相当厉害 <hellwolf|Daniel> 结果一合并,那些专业就没落了 August 19 明年此时http://zhllg.spaces.live.com/blog/cns!956A48A2D7ED7265!206.entry 这样的我们算不算幸运 在人生的定局之后 找到另一个自己 这样的我们对不对得起 守住了欲望是否就安了心 感情从此干干净净 same time next year 在相遇时又会飘着春天的雨 same time next year 还是在这里让我们 好好聊聊岁月的痕迹 same time next year 爱你是谁也不会提起的约定 same time next year 一日的温柔我有364天可回忆 什么都别做什么都别说 我们不会得到什么 因为从未失去过 没人能证明我还是相信 想你的时候我就闭上眼睛 谁能说你不在身边 more about commiting to voip overlay<zhllg> genstef, any editor could add timestamp when editing ChangeLog? <genstef> zhllg: you should use echangelog <genstef> zhllg: http://www.gentoo-sunrise.org/svn/reviewed/scripts/ <genstef> zhllg: you should place echangelog and sunrise-commit in your /usr/local/bin/ <zhllg> thanks <genstef> zhllg: sunrise-commit takes care of digesting and changelog <genstef> sunrise-commit -c "comment" <genstef> -c = generate changelog <zhllg> ok * stkn__ is now known as stkn_ * ChanServ gives channel operator status to stkn_ <zhllg> genstef, done <genstef> stkn_: are you there? <stkn_> yes and no <zhllg> oops, i forget the patch <genstef> zhllg: yeah, you should go back and read what nyhm said in #g-d-h too :) <genstef> zhllg: || die "emake install failed" would be great. Without message it is hard to figure out <genstef> stkn_: I gave zhllg access to the overlay to add his bayonne ebuild <zhllg> ok, i will modify <stkn_> k <zhllg> woo, done I will commit to voip-overlay<zhllg> hi <genstef> zhllg: yeah, you have found the right channel now, congrats :) <zhllg> :) <genstef> zhllg: before giving you access I would like to make sure that you do not break much <zhllg> ok <genstef> zhllg: how many ebuilds have you written? Have you read the devmanual? <genstef> zhllg: do you hang out in #gentoo-dev-help <genstef> zhllg: what is your bugzilla account mail? <zhllg> i don't have a record, sorry. but not so many. few of them are written from scatch. I am reading devmanual. <genstef> cool! <zhllg> i haven't been to #gentoo-dev-help <genstef> zhllg: I guess you realize yourself that this might create potential problems because you do not know enough yet <zhllg> my bugzilla account is robert.zhangle@gmail.com <genstef> zhllg: maybe we can create you a special branch to commit though <zhllg> yes <genstef> zhllg: yeah, and please show your ebuilds around in here or #gentoo-dev-help priop to committing, good? :) <genstef> zhllg: best do that with (emerge nopaste; nopaste /path/to/ebuild) <zhllg> yeah, in fact, i just want to know who i can send the ebuild to. <genstef> well, best place it in bugzilla <genstef> when you do not want to commit to overlays or stuff like that <zhllg> can i be both a staff and a developer? i am also translating GWN to Chinese. <genstef> of course! <genstef> but becoming a developer is a long tedious task <genstef> committing to overlays is not the same as being a developer <zhllg> Xavier Neys maybe soon will be my mentor <genstef> cool <zhllg> so that i can commit gwns i've translated myself <zhllg> actually i have a translation team <genstef> nice <zhllg> maybe later i will decide whether i will be a developer <genstef> what are you translating to? <zhllg> you mean language? <genstef> yes <zhllg> Simplified Chinese <genstef> and you are talking to me from china? <zhllg> i am in Hong Kong now <genstef> my father is in china too atm, flaying back to germany next week <zhllg> i study here and then work here. my hometown is in mainland <genstef> cool! <zhllg> :) <genstef> is it true that you get only filtered internet there? <zhllg> not in Hong Kong <zhllg> but in mainland, to some extent, it is <genstef> heh, and why does not everyone build up a ssh tunnel to hongkong and hpily use it then? :) <zhllg> people can use tor <zhllg> i know some in mainland is using it <genstef> zhllg: have a look at bug 109035 <jeeves> genstef: http://bugs.gentoo.org/109035 enh, P2, All, tupone@gentoo.org->maintainer-wanted@gentoo.org, NEW, pending, bayonne2-1.0.0.ebuild (New Package) <zhllg> but not widely spread <genstef> nice <zhllg> genstef, so i just upload my ebuild there? <genstef> yeah <zhllg> ok <genstef> zhllg: and CC voip maybe <genstef> because it is in the overlay <zhllg> the mail address is ? <genstef> voip@ <zhllg> gentoo.org? <genstef> yes <zhllg> ok <genstef> zhllg: why do you set permissions in postinst? <zhllg> bayonne2-1.1.0 does so, i didn't touch that part <genstef> zhllg: should be done in src_install <genstef> want to change it? <zhllg> ok <genstef> zhllg: with fperms and fowners (using ${D} automatically) <zhllg> thx <genstef> zhllg: and please use emake -j1 instead of just "make" <genstef> zhllg: and emake for src_install <zhllg> ok <genstef> diff -u bayonne2-1.1.0.ebuild yours | nopaste <zhllg> get it <genstef> can you ad a comment somewhere <genstef> # TODO patch for optional useage of net-libs/libeXosip <zhllg> Does fperms and fowners work recursively? <zhllg> or I have to add -R? <genstef> you have to add -R <zhllg> like this? fowners -R root:bayonne ${ROOT}etc/bayonne <zhllg> http://www.rafb.net/paste/results/PcE52s53.html, genstef <genstef> without root <genstef> zhllg: you can stack fperms <genstef> fperms one two <zhllg> ic <genstef> zhllg: without $ROOT, I hope you get it <genstef> useage -> usage <zhllg> solar, just "/etc/bayonne" ? <genstef> sorry, my fault :( <genstef> yes <zhllg> the owner/group of /etc/bayonne and that of /var/lib/bayonne is different. Can i write "fowners -R root:bayonne /etc/bayonne -R bayonne:bayonne /var/lib/bayonne"? <genstef> nah, better make that separately <zhllg> :P <zhllg> http://www.rafb.net/paste/results/htc0iF67.html looks better? <genstef> zhllg: yeah good <genstef> zhllg: you do not need to create a separate branch now that I checked it <genstef> zhllg: ah, use "emake install" <genstef> zhllg: instead of make install <zhllg> ok <genstef> zhllg: are you experienced in committing to svn? <zhllg> i have committed to cvs, but no experience to handle conflicts <genstef> no problem. Just ask when there are conflits <zhllg> ok <genstef> be sure to run ebuild your.ebuild digest before committing <zhllg> ok <genstef> and do not break anything. nopaste ebuilds before commiting :) <zhllg> ok * wltjr (n=wltjr@gentoo/developer/wltjr) has joined #gentoo-voip * dragonheart (n=dragonhe@gentoo/developer/dragonheart) has joined #gentoo-voip <genstef> hi wltjr, dragonheart :) <wltjr> bueno <genstef> zhllg: did it nor work? <zhllg> i will try later. i got some other to do now, sorry, ;) <genstef> zhllg: can you remind me or some other dev in here to check it when you committed it please? <genstef> thanks <zhllg> genstef, no problem 这两天被ccaudio2和bayonne2气的吐血autotools化做的太锉了 |
|
|