From: martijnm.bos@nospicedham.gmail.com   
      
   Hi,   
      
   Thanks for taking the tmie to answer.   
   See my remarks inline   
      
   Best regards,   
   Martijn   
      
   Op zaterdag 2 december 2023 om 10:24:46 UTC+1 schreef Borax Man:   
   > On 2023-12-02, Tavis Ormandy wrote:   
   > > On 2023-11-30, Martijn Bos wrote:   
   > >> Does anyone have any pointers/tips/trics on how to resolve this issue.   
   > >>   
   > >> (I know myself...I probably oversee the obvious...do not hesitate to   
   point that out)   
   > >   
   > > I would just use the disassembler, for example `x/10i _start` instead of   
   > > `list _start`!   
   > >   
   > > I don't think nasm will generate line info automatically (just names),   
   > > so you would set breakpoints on symbols `b _start` or addresses `b   
   > > *0x401000)   
   > >   
   > > However... gas can do it if you prefer this style. Your code is   
   > > basically valid gas syntax already. Just add `.intel_syntax noprefix`   
   > > and add a `.` before directives, e.g. .section, .global, etc, and use #   
   > > for comments instead of ;.   
   > >   
   > > Then you can use `as -g foo.asm -o foo.o` instead.   
   > >   
   > > Now `b foo.asm:123` should work.   
   > >   
   > > Nasm and gas are both great assemblers, it doesn't make much difference   
   > > which one you choose while you're getting started.   
   > >   
   > > Tavis.   
   > >   
   > NASM can generate debugging information which I believe will generate   
   > line info. Pass '-F dwarf' option to nasm if under Linux, and you should see   
   each   
   > line of source in the debugger.   
   >   
   > ie.   
   > nasm -f elf32 -F dwarf hello.asm   
   >   
      
   From 'man nasm' I quote:   
   ==quote==   
    -F format   
    Specifies the debug information format. To see a list of valid   
   output formats, use the -y option (for example -felf -y).   
      
    -g   
    Causes nasm to generate debug information.   
      
    -gformat   
    Equivalent to -g -F format.>   
   ==unquote==   
      
   When I tried your suggestion I got the same result:   
   (gdb) break 8   
   No line 8 in the current file.   
      
   So i tried -gdwarf   
      
   Same result.   
      
   Maybe I should also give the linker some options to handle debug information   
   (?)   
      
      
   Anyway....I'm off for familiy matters.   
      
   I'll try further tomorrow   
      
      
      
      
      
      
      
   > P.S., I assume you're the same Tavis who is known for your FVWM   
   > config?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|