From 9368734e8db693bc2d936ecfaa27f812b5b5dd42 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 26 Jan 2010 12:37:57 -0800 Subject: Fix PC arithmetic for CFI in loc2c-test. * loc2c-test.c (main): Correctly bias PC passed to dwarf_cfi_addrframe. --- loc2c-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loc2c-test.c') diff --git a/loc2c-test.c b/loc2c-test.c index 9d4973ed..6631252c 100644 --- a/loc2c-test.c +++ b/loc2c-test.c @@ -556,7 +556,7 @@ main (int argc, char **argv) if (cfi != NULL) { Dwarf_Frame *frame = NULL; - if (dwarf_cfi_addrframe (cfi, pc, &frame) == 0) + if (dwarf_cfi_addrframe (cfi, pc - bias, &frame) == 0) dwarf_frame_cfa (frame, &cfa_ops, &cfa_nops); } if (cfa_ops == NULL) @@ -565,7 +565,7 @@ main (int argc, char **argv) if (cfi != NULL) { Dwarf_Frame *frame = NULL; - if (dwarf_cfi_addrframe (cfi, pc, &frame) == 0) + if (dwarf_cfi_addrframe (cfi, pc - bias, &frame) == 0) dwarf_frame_cfa (frame, &cfa_ops, &cfa_nops); } } -- cgit