This preview shows page 1. Sign up to view the full content.
Unformatted text preview: up->v f ip ip+1 &s.v &up->v f = = = = = = = = = = 0xbfffefa8, 0xbfffefac, 0xbfffefb4, 0x8049760, 0x8048414 0xbfffef68, 0xbfffef6c, 0xbfffef74, 0x8049770, 0x8048414 *ip ip s.v up->v *ip ip s.v up->v = 0xbfffefe4, **ip =2 ip = xp. *xp = x = 2 = 0x804965c, *ip = 15 ip = &g. g = 15 = ’a’ s in stack frame = ’b’ up points to area in heap
f points to code for fun = 0xbfffefe4, **ip =1 ip in new frame, x = 1 = 0x804965c, *ip = 15 ip same as before = ’a’ s in new frame = ’b’ up points to new area in heap
f points to code for fun 3.12. LIFE IN THE REAL WORLD: USING THE GDB DEBUGGER 165 We see that the function is executed twice—ﬁrst by the direct call from test (line 42), and second by the indirect, recursive call (line 36). We can see that the printed values of the pointers all correspond to addresses. Those starting with 0xbfffef point to locations on the stack, while the rest are part of the global storage (0x804965c), part of the executable code (0x80...
View Full Document
This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.
- Spring '10
- The American