[Ups-cvs] ups/ups ao_dwfutil.c,1.13,1.14
Brought to you by:
ianedwards
From: Tom H. <th...@us...> - 2005-04-27 08:00:07
|
Update of /cvsroot/ups/ups/ups In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30610 Modified Files: ao_dwfutil.c Log Message: Cope with gcc4 which seems to name the frame pointer register explicitly when describing variable locations instead of just using DW_OP_fbreg. Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ao_dwfutil.c 25 Feb 2005 10:12:42 -0000 1.13 --- ao_dwfutil.c 27 Apr 2005 07:59:51 -0000 1.14 *************** *** 43,47 **** #include "ao_symscan.h" #include "ao_dwfutil.h" ! /* --- 43,47 ---- #include "ao_symscan.h" #include "ao_dwfutil.h" ! #include "state.h" /* *************** *** 496,503 **** --- 496,516 ---- Dwarf_Small op; vaddr_t *head = NULL, *vaddr; + unsigned char fb_regop; if ((loclist = dwf_get_locdesc(dbg, die, id, &count)) == NULL) return (vaddr_t *)NULL; + switch (xp_get_addrsize(get_current_target())) + { + case 32: + fb_regop = DW_OP_breg5; + break; + case 64: + fb_regop = DW_OP_breg6; + break; + default: + panic("Unsupported address size"); + } + for (i = 0; i < count; i++) { *************** *** 533,537 **** vaddr->v_op = OP_U_OFFSET; vaddr->v_u_offset = loclist[i].ld_s->lr_number; ! } else if (op == DW_OP_fbreg) { /* * Relative to frame base. --- 546,550 ---- vaddr->v_op = OP_U_OFFSET; vaddr->v_u_offset = loclist[i].ld_s->lr_number; ! } else if (op == DW_OP_fbreg || op == fb_regop) { /* * Relative to frame base. |