Re: precise debugging of inline asm

Claudio Fontana <[email protected]> Sun, 01 Jun 2008 19:27:26 +0200
Newsgroups org.kernel.vger.linux-assembly
Message-ID <[email protected]>
[email protected] wrote:
> Hello!
> 
> 
> The  mentioning  of  gdb  in  this  mailinglist  gave  me  the  idea to ask my
> unresolved question here as well:
> 
> Trying to port cpt2 to linux I have an inline assembly part of about 100 lines
> that causes a segmentation fault while juggling around with memory. When I use
> gdb for debugging it sadly only points me to the line  where  the  inline  asm
> starts.  I  haven't  been able to figure out how to get a more precise info in
> what line the actual segmentation fault comes from.
> Does anybody here know if that is at all possible and if so, how? Would labels
> to each line help?
> 
> Thanks for any help or hints.
> Lynx

On x86, try for example

(gdb) disassemble $eip $eip+20

Also see
(gdb) info registers

Cld