我正在使用 Xalan library .我的程序在 Xalan 调用中的某处崩溃。我希望看到从 main() 一直到崩溃点的完整堆栈跟踪。我正在使用以下命令行进行编译
g++ -o program.out -g -O0 -lxalan-c myprogram.out
我正在使用“backtrace full”命令并获得以下输出
#0 0xb79313b4 in xalanc_1_11::XPath::findRoot(xalanc_1_11::XPathExecutionContext&, xalanc_1_11::XalanNode*, int const*, int, xalanc_1_11::MutableNodeRefList&) const () from /usr/lib/libxalan-c.so.111
No symbol table info available.
#1 0xb793afa9 in xalanc_1_11::XPath::step(xalanc_1_11::XPathExecutionContext&, xalanc_1_11::XalanNode*, int const*, xalanc_1_11::MutableNodeRefList&) const
() from /usr/lib/libxalan-c.so.111
No symbol table info available.
#2 0xb793d350 in xalanc_1_11::XPath::locationPath(xalanc_1_11::XalanNode*, int const*, xalanc_1_11::XPathExecutionContext&) const ()
from /usr/lib/libxalan-c.so.111
No symbol table info available.
#3 0xb7937d22 in xalanc_1_11::XPath::executeMore(xalanc_1_11::XalanNode*, int const*, xalanc_1_11::XPathExecutionContext&) const ()
from /usr/lib/libxalan-c.so.111
No symbol table info available.
#4 0xbffff02c in ?? ()
No symbol table info available.
上面的堆栈跟踪显然没有显示从 main() 开始的完整堆栈跟踪,我错过了什么?
只有一个线程在运行,这里是show threads的输出
Id Target Id Frame
* 1 Thread 0xb6f79980 (LWP 8888) "xmltest.out" 0xb79313b4 in xalanc_1_11::XPath::findRoot(xalanc_1_11::XPathExecutionContext&, xalanc_1_11::XalanNode*, int const*, int, xalanc_1_11::MutableNodeRefList&) const () from /usr/lib/libxalan-c.so.111
最佳答案
使用 -g 重建 libxalan-c,您应该可以看到它的回溯。
如评论中所述,某些目标可能需要 -ggdb 或 -ggdb3 而不是 -g。
关于c++ - gdb backtrace 没有显示 main() 的完整堆栈跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20023737/
我得到了一个包含嵌套链接的表单。编辑时链接字段为空的问题。这是我的表格:Editingkategori{:action=>'update',:id=>@konkurrancer.id})do|f|%>'Trackingurl',:style=>'width:500;'%>'Editkonkurrence'%>|我的konkurrencer模型:has_one:link我的链接模型:classLink我的konkurrancer编辑操作:defedit@konkurrancer=Konkurrancer.find(params[:id])@konkurrancer.link_attrib
我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i
我好像记得Lua有类似Ruby的method_missing的东西。还是我记错了? 最佳答案 表的metatable的__index和__newindex可以用于与Ruby的method_missing相同的效果。 关于ruby-难道Lua没有和Ruby的method_missing相媲美的东西吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/7732154/
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
我的瘦服务器配置了nginx,我的ROR应用程序正在它们上运行。在我发布代码更新时运行thinrestart会给我的应用程序带来一些停机时间。我试图弄清楚如何优雅地重启正在运行的Thin实例,但找不到好的解决方案。有没有人能做到这一点? 最佳答案 #Restartjustthethinserverdescribedbythatconfigsudothin-C/etc/thin/mysite.ymlrestartNginx将继续运行并代理请求。如果您将Nginx设置为使用多个上游服务器,例如server{listen80;server
我想在一个没有Sass引擎的类中使用Sass颜色函数。我已经在项目中使用了sassgem,所以我认为搭载会像以下一样简单:classRectangleincludeSass::Script::FunctionsdefcolorSass::Script::Color.new([0x82,0x39,0x06])enddefrender#hamlengineexecutedwithcontextofself#sothatwithintemlateicouldcall#%stop{offset:'0%',stop:{color:lighten(color)}}endend更新:参见上面的#re
所以我在关注Railscast,我注意到在html.erb文件中,ruby代码有一个微弱的背景高亮效果,以区别于其他代码HTML文档。我知道Ryan使用TextMate。我正在使用SublimeText3。我怎样才能达到同样的效果?谢谢! 最佳答案 为SublimeText安装ERB包。假设您安装了SublimeText包管理器*,只需点击cmd+shift+P即可获得命令菜单,然后键入installpackage并选择PackageControl:InstallPackage获取包管理器菜单。在该菜单中,键入ERB并在看到包时选择
我试图在索引页中创建一个超链接,但它没有显示,也没有给出任何错误。这是我的index.html.erb代码。ListingarticlesTitleTextssss我检查了我的路线,我认为它们也没有问题。PrefixVerbURIPatternController#Actionwelcome_indexGET/welcome/index(.:format)welcome#indexarticlesGET/articles(.:format)articles#indexPOST/articles(.:format)articles#createnew_articleGET/article
我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c
大家好!我想知道Ruby中未使用语法ClassName.method_name调用的方法是如何工作的。我头脑中的一些是puts、print、gets、chomp。可以在不使用点运算符的情况下调用这些方法。为什么是这样?他们来自哪里?我怎样才能看到这些方法的完整列表? 最佳答案 Kernel中的所有方法都可用于Object类的所有对象或从Object派生的任何类。您可以使用Kernel.instance_methods列出它们。 关于没有类的Ruby方法?,我们在StackOverflow