| OLD | NEW |
| 1 /* DWARF 2 Expression Evaluator. | 1 /* DWARF 2 Expression Evaluator. |
| 2 | 2 |
| 3 Copyright (C) 2001-2003, 2005, 2007-2012 Free Software Foundation, | 3 Copyright (C) 2001-2003, 2005, 2007-2012 Free Software Foundation, |
| 4 Inc. | 4 Inc. |
| 5 | 5 |
| 6 Contributed by Daniel Berlin (dan@dberlin.org) | 6 Contributed by Daniel Berlin (dan@dberlin.org) |
| 7 | 7 |
| 8 This file is part of GDB. | 8 This file is part of GDB. |
| 9 | 9 |
| 10 This program is free software; you can redistribute it and/or modify | 10 This program is free software; you can redistribute it and/or modify |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 cases in the evaluator. */ | 335 cases in the evaluator. */ |
| 336 ctx->location = DWARF_VALUE_OPTIMIZED_OUT; | 336 ctx->location = DWARF_VALUE_OPTIMIZED_OUT; |
| 337 } | 337 } |
| 338 else if (p->location == DWARF_VALUE_MEMORY) | 338 else if (p->location == DWARF_VALUE_MEMORY) |
| 339 { | 339 { |
| 340 p->v.mem.addr = dwarf_expr_fetch_address (ctx, 0); | 340 p->v.mem.addr = dwarf_expr_fetch_address (ctx, 0); |
| 341 p->v.mem.in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); | 341 p->v.mem.in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0); |
| 342 } | 342 } |
| 343 else if (p->location == DWARF_VALUE_IMPLICIT_POINTER) | 343 else if (p->location == DWARF_VALUE_IMPLICIT_POINTER) |
| 344 { | 344 { |
| 345 p->v.ptr.die = ctx->len; | 345 p->v.ptr.die.cu_off = ctx->len; |
| 346 p->v.ptr.offset = value_as_long (dwarf_expr_fetch (ctx, 0)); | 346 p->v.ptr.offset = value_as_long (dwarf_expr_fetch (ctx, 0)); |
| 347 } | 347 } |
| 348 else if (p->location == DWARF_VALUE_REGISTER) | 348 else if (p->location == DWARF_VALUE_REGISTER) |
| 349 p->v.regno = value_as_long (dwarf_expr_fetch (ctx, 0)); | 349 p->v.regno = value_as_long (dwarf_expr_fetch (ctx, 0)); |
| 350 else | 350 else |
| 351 { | 351 { |
| 352 p->v.value = dwarf_expr_fetch (ctx, 0); | 352 p->v.value = dwarf_expr_fetch (ctx, 0); |
| 353 } | 353 } |
| 354 } | 354 } |
| 355 | 355 |
| 356 /* Evaluate the expression at ADDR (LEN bytes long) using the context | 356 /* Evaluate the expression at ADDR (LEN bytes long) using the context |
| 357 CTX. */ | 357 CTX. */ |
| 358 | 358 |
| 359 void | 359 void |
| 360 dwarf_expr_eval (struct dwarf_expr_context *ctx, const gdb_byte *addr, | 360 dwarf_expr_eval (struct dwarf_expr_context *ctx, const gdb_byte *addr, |
| 361 size_t len) | 361 size_t len) |
| 362 { | 362 { |
| 363 int old_recursion_depth = ctx->recursion_depth; | 363 int old_recursion_depth = ctx->recursion_depth; |
| 364 | 364 |
| 365 execute_stack_op (ctx, addr, addr + len); | 365 execute_stack_op (ctx, addr, addr + len); |
| 366 | 366 |
| 367 /* CTX RECURSION_DEPTH becomes invalid if an exception was thrown here. */ | 367 /* CTX RECURSION_DEPTH becomes invalid if an exception was thrown here. */ |
| 368 | 368 |
error: old chunk mismatch |
None
| OLD | NEW |