[lldb-dev] Problem with large sym files
Greg Clayton
gclayton at apple.com
Mon Sep 26 10:07:49 PDT 2011
> The problem is that we're back at square number one, I still get an error
> message from dsymutil while extracting the symbols from the main
> executable:
>
> error: unable to restore file position to 0x00000c58 for section
> __DWARF.__debug_info
>
> Any other ideas?
Does this happen every time? Or just some of the time? Mach files have a 4 GB limit of the section size, I hope you aren't getting close to that limit?
dwarfdump has a really goofy option I added to track such issues where you can display file data for your executable and all .o files. You run this on your executable (not your dSYM):
% dwarfdump --show-children --file-stats a.out
File symtab strtab code data DWARF debug STABS debug other file
--------- ----------------- ----------------- ----------------- ----------------- ----------------- ----------------- ---------------------------------------
9104 192 2.11% 166 1.82% 1187 13.04% 0 0.00% 202 2.22% 7357 80.81% a.out (i386)
4040 84 2.08% 73 1.81% 915 22.65% 917 22.70% 0 0.00% 2051 50.77% /tmp/main.o (i386)
========= ================= ================= ================= ================= ================= ================= =======================================
13144 276 2.10% 239 1.82% 2102 15.99% 917 6.98% 202 1.54% 9408 71.58%
It basically looks into your main executable and finds all of the .o files from the debug map and prints out stats at the end. You should run this on your main executable and see what the totals come out to.
If you are able to get a dSYM file, you can view its section sizes:
% dwarfdump -R /tmp/large.dSYM
...
__debug_abbrev __DWARF 011ac000 00002278 00379000 00000000 00000000 00000000 00000000 00000000 00000000 8.62K 0.00%
__debug_aranges __DWARF 011ae278 0004b098 0037b278 00000000 00000000 00000000 00000000 00000000 00000000 300.15K 0.12%
__debug_frame __DWARF 011f9310 0014fd24 003c6310 00000000 00000000 00000000 00000000 00000000 00000000 1.31M 0.52%
__debug_info __DWARF 01349034 0bc4a338 00516034 00000000 00000000 00000000 00000000 00000000 00000000 188.29M 75.15%
__debug_inlined __DWARF 0cf9336c 00229b4f 0c16036c 00000000 00000000 00000000 00000000 00000000 00000000 2.16M 0.86%
__debug_line __DWARF 0d1bcebb 00822243 0c389ebb 00000000 00000000 00000000 00000000 00000000 00000000 8.13M 3.25%
__debug_loc __DWARF 0d9df0fe 0068d8f4 0cbac0fe 00000000 00000000 00000000 00000000 00000000 00000000 6.55M 2.62%
__debug_pubnames __DWARF 0e06c9f2 002b42e1 0d2399f2 00000000 00000000 00000000 00000000 00000000 00000000 2.70M 1.08%
__debug_pubtypes __DWARF 0e320cd3 00eec229 0d4edcd3 00000000 00000000 00000000 00000000 00000000 00000000 14.92M 5.96%
__debug_ranges __DWARF 0f20cefc 00484c78 0e3d9efc 00000000 00000000 00000000 00000000 00000000 00000000 4.52M 1.80%
__debug_str __DWARF 0f691b74 00cee6d0 0e85eb74 00000000 00000000 00000000 00000000 00000000 00000000 12.93M 5.16%
Let me know how big things are on your end when you get the chance.
Greg Clayton
More information about the lldb-dev
mailing list