September 2008
Intermediate to advanced
280 pages
6h 31m
English
GDB and DDD can be extremely useful in debugging assembly language code. There are a number of special considerations to keep in mind, which will be described in this section.
Take as an example the code in file testff.s:
1 # the subroutine findfirst(v,w,b) finds the first instance of a value v 2 # in a block of w consecutive words of memory beginning at b, returning 3 # either the index of the word where v was found (0, 1, 2, ...) or -1 if 4 # v was not found; beginning with _start, we have a short test of the 5 # subroutine 6 7 .data # data segment 8 x: 9 .long 1 10 .long 5 11 .long 3 12 .long 168 13 .long 8888 14 .text # code segment 15 .globl _start # required 16 _start: # required to use this label unless special ...
Read now
Unlock full access