﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Clear-随笔分类-Mac</title><link>http://www.cppblog.com/newclear/category/20148.html</link><description>记忆中的闪光，总会蒙尘。</description><language>zh-cn</language><lastBuildDate>Sun, 28 Oct 2012 18:24:55 GMT</lastBuildDate><pubDate>Sun, 28 Oct 2012 18:24:55 GMT</pubDate><ttl>60</ttl><item><title>GDB在Mac下的调试信息</title><link>http://www.cppblog.com/newclear/archive/2012/10/28/193994.html</link><dc:creator>Clear</dc:creator><author>Clear</author><pubDate>Sun, 28 Oct 2012 15:47:00 GMT</pubDate><guid>http://www.cppblog.com/newclear/archive/2012/10/28/193994.html</guid><wfw:comment>http://www.cppblog.com/newclear/comments/193994.html</wfw:comment><comments>http://www.cppblog.com/newclear/archive/2012/10/28/193994.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/newclear/comments/commentRss/193994.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/newclear/services/trackbacks/193994.html</trackback:ping><description><![CDATA[上次说了GDB的pretty printer，这次来说说调试程序的问题。<br /><br />在Linux或者Windows下面，写好代码，g++编译，连接，调试，一切很顺畅。<br /><br />但是在Mac下面，有点小问题。<br /><br />我们如果是直接编译生成可执行文件：<br />g++ test.cpp -g -o test<br />ok，我们用GDB调试，没有问题。<br />但是如果我们分两步，编译和连接分开的话：<br />g++ test.cpp -g -c -o test.o<br />g++ -o test test.o<br />这次我们gdb test再调试，会发现GDB找不到调试符号信息！<br /><br />两次生成有什么不同呢？<br />一次编译生成的test，旁边有一个test.dSYM，而单独连接的test，没有这个。<br /><br />test.dSYM就是调试符号信息。<br />要想生成这个东西，也简单，运行dsymutil就可以了：<br />dsymutil test<br />再然后，就可以用GDB顺利调试了。<br /><br />g++直接生成可执行文件的时候，会帮我们调用一次dsymutil，但是单独连接的时候却不会做这个，这就是造成差别的原因。<img src ="http://www.cppblog.com/newclear/aggbug/193994.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/newclear/" target="_blank">Clear</a> 2012-10-28 23:47 <a href="http://www.cppblog.com/newclear/archive/2012/10/28/193994.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>GoAgent 2.1.* 安装</title><link>http://www.cppblog.com/newclear/archive/2012/10/28/193993.html</link><dc:creator>Clear</dc:creator><author>Clear</author><pubDate>Sun, 28 Oct 2012 15:34:00 GMT</pubDate><guid>http://www.cppblog.com/newclear/archive/2012/10/28/193993.html</guid><wfw:comment>http://www.cppblog.com/newclear/comments/193993.html</wfw:comment><comments>http://www.cppblog.com/newclear/archive/2012/10/28/193993.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/newclear/comments/commentRss/193993.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/newclear/services/trackbacks/193993.html</trackback:ping><description><![CDATA[话说配好GoAgent后就一直用着来着，偶尔抽下风，但一般都没问题<br />可是这两天总是不能访问，搞得比较头痛，终于今天准备升级GoAgent到2.1.3了<br /><br />下载，python upload.zip，好了，有错...<br />ok.<br />需要安装gevent。<br />我这是mac：<br />sudo port install py-gevent<br />再次 python upload.zip<br />还是出错:(<br />找了半天，原来我的gevent版本太高？这也能出错？晕死<br />vim ../local/proxy.py<br />找这么一行：<br />class DNSServer(gevent.server.DatagramServer):<br />改成：<br />class DNSServer(gevent.server.StreamServer):<br />好了，终于可以<br />python upload.zip<br />ok了<br /><br />然后就是改改appid，不提<br />python proxy.py<br />没问题。<br />运行GoAgentMac，好了，找不到gevent！<br />原来他用的是系统的python，库不在一个地方：<br /><div>sudo ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages&nbsp;/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages<br />这下，终于世界太平了。</div><div></div><img src ="http://www.cppblog.com/newclear/aggbug/193993.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/newclear/" target="_blank">Clear</a> 2012-10-28 23:34 <a href="http://www.cppblog.com/newclear/archive/2012/10/28/193993.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>