[Nasm-bugs] [Bug 3392366] Mach-O Executables do not contain debug information.

no-reply at bugzilla-nasm.gorcunov.org no-reply at bugzilla-nasm.gorcunov.org
Fri Oct 21 16:28:40 PDT 2016


https://bugzilla.nasm.us/show_bug.cgi?id=3392366

--- Comment #3 from Andrew Fish <afish at apple.com> ---
I constructed a simple .S and .NASM Hello World for macOS as test cases to show
how debug information should work. Each assembly file starts with a comment on
how to generate the executable and the dSYM. 

dwarfdump from clang integrated assembler:
----------------------------------------------------------------------
 File: HelloWorld.dSYM/Contents/Resources/DWARF/HelloWorld (x86_64)
----------------------------------------------------------------------
.debug_info contents:

0x00000000: Compile Unit: length = 0x00000043  version = 0x0003  abbr_offset =
0x00000000  addr_size = 0x08  (next CU at 0x00000047)

0x0000000b: TAG_compile_unit [1] *
             AT_stmt_list( 0x00000000 )
             AT_low_pc( 0x0000000000000000 )
             AT_high_pc( 0x000000000000002e )
             AT_name( "HelloWorld.S" )
             AT_comp_dir( "/Users/andrewfish/work/nasm" )
             AT_producer( "Apple LLVM version 6.1.0 (clang-602.0.53) (based on
LLVM 3.6.0svn)" )
             AT_language( Unknown DW_LANG constant: 0x8001 )

0x0000002e:     TAG_label [2] *
                 AT_name( "start" )
                 AT_decl_file( "/Users/andrewfish/work/nasm/HelloWorld.S" )
                 AT_decl_line( 9 )
                 AT_low_pc( 0x0000000000001fd2 )
                 AT_prototyped( 0x00 )

0x00000044:         TAG_unspecified_parameters [3]  

0x00000045:         NULL

0x00000046:     NULL


dwarfdump from NASM:
warning: no debug symbols in executable (-arch x86_64)
----------------------------------------------------------------------
 File: HelloWorld.dSYM/Contents/Resources/DWARF/HelloWorld (x86_64)
----------------------------------------------------------------------
.debug_info contents:
< EMPTY >

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list