GNU Binutils with patches for OS216
Revisión | 8d357ccaa7453f32482275a89577fe5d4445f383 (tree) |
---|---|
Tiempo | 2003-01-09 07:47:46 |
Autor | Andrew Cagney <cagney@redh...> |
Commiter | Andrew Cagney |
2003-01-08 Andrew Cagney <cagney@redhat.com>
* gcore.c, i386-linux-tdep.c: Use get_frame_pc, get_next_frame and
get_frame_base.
@@ -1,3 +1,8 @@ | ||
1 | +2003-01-08 Andrew Cagney <cagney@redhat.com> | |
2 | + | |
3 | + * gcore.c, i386-linux-tdep.c: Use get_frame_pc, get_next_frame and | |
4 | + get_frame_base. | |
5 | + | |
1 | 6 | 2003-01-08 David Carlton <carlton@math.stanford.edu> |
2 | 7 | |
3 | 8 | * linespec.c (decode_line_1): Move code into decode_variable. |
@@ -179,7 +179,7 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top) | ||
179 | 179 | return 0; /* Can't succeed without current frame. */ |
180 | 180 | |
181 | 181 | /* Save frame pointer of TOS frame. */ |
182 | - *top = fi->frame; | |
182 | + *top = get_frame_base (fi); | |
183 | 183 | /* If current stack pointer is more "inner", use that instead. */ |
184 | 184 | if (INNER_THAN (read_sp (), *top)) |
185 | 185 | *top = read_sp (); |
@@ -189,7 +189,7 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top) | ||
189 | 189 | fi = tmp_fi; |
190 | 190 | |
191 | 191 | /* Save frame pointer of prev-most frame. */ |
192 | - *bottom = fi->frame; | |
192 | + *bottom = get_frame_base (fi); | |
193 | 193 | |
194 | 194 | /* Now canonicalize their order, so that 'bottom' is a lower address |
195 | 195 | (as opposed to a lower stack frame). */ |
@@ -247,16 +247,16 @@ i386_linux_sigcontext_addr (struct frame_info *frame) | ||
247 | 247 | { |
248 | 248 | CORE_ADDR pc; |
249 | 249 | |
250 | - pc = i386_linux_sigtramp_start (frame->pc); | |
250 | + pc = i386_linux_sigtramp_start (get_frame_pc (frame)); | |
251 | 251 | if (pc) |
252 | 252 | { |
253 | 253 | CORE_ADDR sp; |
254 | 254 | |
255 | - if (frame->next) | |
255 | + if (get_next_frame (frame)) | |
256 | 256 | /* If this isn't the top frame, the next frame must be for the |
257 | 257 | signal handler itself. The sigcontext structure lives on |
258 | 258 | the stack, right after the signum argument. */ |
259 | - return frame->next->frame + 12; | |
259 | + return get_frame_base (get_next_frame (frame)) + 12; | |
260 | 260 | |
261 | 261 | /* This is the top frame. We'll have to find the address of the |
262 | 262 | sigcontext structure by looking at the stack pointer. Keep |
@@ -264,20 +264,21 @@ i386_linux_sigcontext_addr (struct frame_info *frame) | ||
264 | 264 | "pop %eax". If the PC is at this instruction, adjust the |
265 | 265 | returned value accordingly. */ |
266 | 266 | sp = read_register (SP_REGNUM); |
267 | - if (pc == frame->pc) | |
267 | + if (pc == get_frame_pc (frame)) | |
268 | 268 | return sp + 4; |
269 | 269 | return sp; |
270 | 270 | } |
271 | 271 | |
272 | - pc = i386_linux_rt_sigtramp_start (frame->pc); | |
272 | + pc = i386_linux_rt_sigtramp_start (get_frame_pc (frame)); | |
273 | 273 | if (pc) |
274 | 274 | { |
275 | - if (frame->next) | |
275 | + if (get_next_frame (frame)) | |
276 | 276 | /* If this isn't the top frame, the next frame must be for the |
277 | 277 | signal handler itself. The sigcontext structure is part of |
278 | 278 | the user context. A pointer to the user context is passed |
279 | 279 | as the third argument to the signal handler. */ |
280 | - return read_memory_integer (frame->next->frame + 16, 4) + 20; | |
280 | + return read_memory_integer (get_frame_base (get_next_frame (frame)) | |
281 | + + 16, 4) + 20; | |
281 | 282 | |
282 | 283 | /* This is the top frame. Again, use the stack pointer to find |
283 | 284 | the address of the sigcontext structure. */ |