dwarf

Profiling my program with linux perf and different call graph modes gives different results

不想你离开。 提交于 2021-02-07 04:35:13
问题 I want to profile my c++ program with linux perf. For this I used the three following commands and I do not understand why I get three completely different reports. perf record --call-graph dwarf ./myProg perf report perf record --call-graph fp ./myProg perf report perf record --call-graph lbr ./myProg perf report Also I do not understand why the main function is not the highest function in the list. The logic of my program is the following, the main function calls the getPogDocumentFromFile

Converting debug symbols from DWARF to PDB

廉价感情. 提交于 2021-01-27 05:09:32
问题 Is there a way to convert the debugging information from binutils' DWARF format (as emitted by GCC on Cygwin, for example) to Microsoft PDB (as consumed by Visual Studio)? 回答1: cv2pdb can do this. I have had mixed results, sometimes it works splendidly while at other times some local and global variables are lost https://github.com/rainers/cv2pdb 来源: https://stackoverflow.com/questions/28907093/converting-debug-symbols-from-dwarf-to-pdb

use and meaning of DW_AT_location

瘦欲@ 提交于 2020-01-16 05:26:32
问题 I wanted to know the use of the attribute DW_AT_location for debugging. It is one of the attributes specified by dwarf for debugging, but could not really understand what exactly it represents. And also when should this attribute be emitted when we compile a code. 回答1: From the DWARF 3 spec (http://dwarfstd.org/doc/Dwarf3.pdf): 2.16 Data Locations Any debugging information entry describing a data object, which includes variables, parameters, common blocks and the like, may have a DW_AT

atos and dwarfdump won't symbolicate my address

北城以北 提交于 2019-12-28 03:23:07
问题 I received a crash report via AirBrake.io that isn't symbolicated. Since the crash report is not in exactly the same format as an Apple crashlog I can't just drop it on XCode as usual, so I took the exact same build from my XCode archive tried to symbolicate it on the commandline. With the following result: $ atos -o kidsapp.app/kidsapp 0x0002fc4c 0x0002fc4c (in kidsapp) I'm absolutely sure I'm using the same build as the crash report is from. So I also tried with dwarfdump: $ dwarfdump -

Get location of symbols in a.out file

限于喜欢 提交于 2019-12-24 20:23:05
问题 This question does a great job explaining how to get the symbols (variables, functions, etc) of an elf file. Now that I have the symbols I will like to know on what location (module) they are . For example if I compile a program that consists of the files main.c , someFile.h and someFile.c . Also let's say that the main.c program contains the global variable int Counter. then how I be able to tell that variable Counter is located in main.c? 回答1: the Answer is in here. . 来源: https:/

Info.plist file processing modifies executable

天涯浪子 提交于 2019-12-24 19:25:56
问题 I've been working on an iPhone application had an issue where dSYM file generation was seg faulting on me. GenerateDSYMFile /Users/kaom/Projects/build/Release-iphoneos/NodeAppGen.app.dSYM /Users/kaom/Projects/build/Release-iphoneos/NodeAppGen.app/NodeAppGen cd /Users/kaom/Projects/Apps/NodeAppGen setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/usr/bin/dsymutil /Users/kaom/Projects/build/Release-iphoneos

How do I best determine if a binary contains STAB or DWARF debug information?

元气小坏坏 提交于 2019-12-24 14:14:51
问题 When it comes to ELF, two accompanying debugging formats are overwhelmingly popular to others, namely STAB and DWARF. I'd like an easy way to ascertain whether a given binary contains debug information of one form or the other, preferably without having to inspect section names (.stab, etc.). What are good ways of accomplishing this? 回答1: When it comes to ELF, two accompanying debugging formats are overwhelmingly popular The STABS format has not been used by default by any current compilers

Dwarf Error: wrong version in compilation unit header (is 4, should be 2)

送分小仙女□ 提交于 2019-12-22 01:25:11
问题 A shared object was built on RedHat Linux and while all the code was compiled with debug, the debugger (gdb) refused to load the symbols and issued an error as in: ... GNU gdb Fedora (6.8-37.el5) ... This GDB was configured as "x86_64-redhat-linux-gnu"... Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module libgrokf.so] With this error, I could not get break points to trigger in any function nor see proper stack trace. I recompiled the entire project but

Is there a simple DWARF CFI represenation for functions that set up a conventional frame pointer?

99封情书 提交于 2019-12-19 18:48:40
问题 I'm programming in a mix of C, C++ and assembly and I'd like to get reliable backtraces from any part of the code. This mostly works fine for the C and C++ code since I can generate debugging info with -g , which for modern x86 compilers and platforms generates DWARF debugging information which means the final binary includes CFI (Call Frame Information). This information allows walking backwards though the functions in the current call stack. It can support complex scenarios such as