ups-cvs Mailing List for UPS debugger (Page 2)
Brought to you by:
ianedwards
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(49) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(1) |
Feb
|
Mar
(10) |
Apr
(5) |
May
|
Jun
(5) |
Jul
(19) |
Aug
(29) |
Sep
(3) |
Oct
(1) |
Nov
(8) |
Dec
|
2004 |
Jan
|
Feb
(20) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2005 |
Jan
(1) |
Feb
(10) |
Mar
(5) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(11) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(34) |
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Tom H. <th...@us...> - 2014-01-14 22:47:28
|
Update of /cvsroot/ups/ups/lib/libx11wn In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16373/lib/libx11wn Modified Files: wn_event.c Log Message: Only remove the SIGIO handler after we have cleared the async flag on the socket, or we might get a signal in the interim that will then cause the process to abort. Index: wn_event.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libx11wn/wn_event.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wn_event.c 20 Mar 2009 16:42:13 -0000 1.8 --- wn_event.c 14 Jan 2014 22:47:25 -0000 1.9 *************** *** 1319,1323 **** else { #ifdef FASYNC /* RGA linux merge */ - (void) safe_signal(SIGIO, old_io_func); #ifndef __hp9000s800 #ifdef USE_STREAMS --- 1319,1322 ---- *************** *** 1334,1337 **** --- 1333,1337 ---- #endif #endif /* __hp9000s800 */ + (void) safe_signal(SIGIO, old_io_func); #endif /* RGA linux merge */ set_normal_event_mask(w); |
From: Tom H. <th...@us...> - 2014-01-14 15:58:26
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12233/ups Modified Files: ci_lex.c Log Message: Avoid reading past the end of strings when comparing tokens. Index: ci_lex.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ci_lex.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ci_lex.c 14 Jan 2014 15:31:50 -0000 1.4 --- ci_lex.c 14 Jan 2014 15:58:24 -0000 1.5 *************** *** 675,679 **** for (i = 0; i < NKEYS; ++i) ! if (memcmp(Keytab[i].name, line, len) == 0 && Keytab[i].name[len] == '\0') break; --- 675,679 ---- for (i = 0; i < NKEYS; ++i) ! if (strncmp(Keytab[i].name, line, len) == 0 && Keytab[i].name[len] == '\0') break; |
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9957 Modified Files: ao_aflist.c ao_dwfsyms.c ao_dwftext.c ao_dwftype.c ao_elfsym.c ao_ptrace.c ao_symload.c ao_symparse.c ao_target.c ci_decl.c ci_func.c ci_lex.c ci_opcodes.c exec.c expr.c obj_bpt.c obj_stack.c obj_target.c obj_wpt.c printf.c reg.c srcbuf.c srcwin.c st_util.c tdr.c trun_j.c ui_layout.c ups.c util.c va_edit.c va_menu.c xc_text.c Log Message: Fix compiler warnings. Index: ui_layout.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ui_layout.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_layout.c 21 Feb 2004 17:54:08 -0000 1.5 --- ui_layout.c 14 Jan 2014 15:31:51 -0000 1.6 *************** *** 649,653 **** Region *root, *line, *regs[MAX_REGNUM]; target_menu_info_t tmbuf; ! font_t *sysfont, *menufont; /* Dimensions and percentages */ --- 649,653 ---- Region *root, *line, *regs[MAX_REGNUM]; target_menu_info_t tmbuf; ! font_t *menufont; /* Dimensions and percentages */ *************** *** 672,676 **** /* Set up fixed dimensions. Some of these vary with font heights. */ - sysfont = wn_get_sysfont(); menufont = Mstdfont(); menu_height = menufont->ft_height + 8; --- 672,675 ---- *************** *** 2576,2580 **** bool enable; { - menu_arg_t *ma; Region *dmenu_region; char rvs[2]; --- 2575,2578 ---- *************** *** 2582,2586 **** dmenu_region = get_dynamic_menu_region(); - ma = (menu_arg_t *)re_get_data(dmenu_region); rvs[0] = (enable) ? (char)MR_ENABLE_ALL_BREAKPOINTS : (char)MR_DISABLE_ALL_BREAKPOINTS; --- 2580,2583 ---- *************** *** 2597,2601 **** bool enable; { - menu_arg_t *ma; Region *dmenu_region; char rvs[2]; --- 2594,2597 ---- *************** *** 2603,2607 **** dmenu_region = get_dynamic_menu_region(); - ma = (menu_arg_t *)re_get_data(dmenu_region); rvs[0] = (enable) ? (char)MR_ENABLE_ALL_WATCHPOINTS : (char)MR_DISABLE_ALL_WATCHPOINTS; --- 2599,2602 ---- Index: tdr.c =================================================================== RCS file: /cvsroot/ups/ups/ups/tdr.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tdr.c 26 Jun 2009 10:48:11 -0000 1.2 --- tdr.c 14 Jan 2014 15:31:51 -0000 1.3 *************** *** 663,669 **** { char *endstr; - long val; ! val = strtol(*p_uline, &endstr, (fline[1] == 'h') ? 16 : 10); if (endstr == *p_uline) --- 663,668 ---- { char *endstr; ! strtol(*p_uline, &endstr, (fline[1] == 'h') ? 16 : 10); if (endstr == *p_uline) Index: ci_lex.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ci_lex.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ci_lex.c 26 Jun 2009 14:39:29 -0000 1.3 --- ci_lex.c 14 Jan 2014 15:31:50 -0000 1.4 *************** *** 801,810 **** --- 801,814 ---- char *end; number_t val; + #if !WANT_UINT_CONST const char *startline; + #endif /* BUG: handle signed/unsigned and types correctly. * Mostly fixed now. 13/1/99 Dibyendu. */ + #if !WANT_UINT_CONST startline = line-1; + #endif if (!convert_number(line - 1, 0, &end, &val)) { token = BADTOK; Index: obj_target.c =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_target.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** obj_target.c 15 Jan 2003 14:22:12 -0000 1.2 --- obj_target.c 14 Jan 2014 15:31:51 -0000 1.3 *************** *** 195,201 **** const char **p_display_string; { ! char *command_line, *cmdline, *new_path; const char *efile; ! int efile_len, fd, i; long mtime; --- 195,201 ---- const char **p_display_string; { ! char *command_line, *new_path; const char *efile; ! int fd, i; long mtime; *************** *** 212,229 **** if (Com_objcode) { - cmdline = (char *)get_field_value(Com_objcode, FN_COM_ARGS); efile = (char *)get_field_value(Com_objcode, FN_COM_EFILE); } else { - cmdline = ""; efile = ""; } - efile_len = strlen(efile); if (!Use_full_path) { efile = base_name(efile); - efile_len = strlen(efile); } --- 212,225 ---- Index: ci_opcodes.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ci_opcodes.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ci_opcodes.c 22 Jun 2006 09:08:40 -0000 1.8 --- ci_opcodes.c 14 Jan 2014 15:31:50 -0000 1.9 *************** *** 833,840 **** textword_t **p_pc; { - textword_t *pc; - - pc = *p_pc; - /* Dibyendu : following looks incorrect - see xc_machine.c */ /* if (func_index >= 0) */ --- 833,836 ---- Index: util.c =================================================================== RCS file: /cvsroot/ups/ups/ups/util.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** util.c 4 Nov 2002 14:56:20 -0000 1.2 --- util.c 14 Jan 2014 15:31:51 -0000 1.3 *************** *** 48,52 **** char *obuf, *optr, *word; char **words, **argv; ! bool new_word, word_exists; /* No escape sequence makes a line longer, so the length of --- 48,52 ---- char *obuf, *optr, *word; char **words, **argv; ! bool word_exists; /* No escape sequence makes a line longer, so the length of *************** *** 58,62 **** iptr = line; quotec = '\0'; - new_word = TRUE; word_exists = FALSE; --- 58,61 ---- Index: ao_target.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_target.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ao_target.c 13 Jul 2009 13:47:37 -0000 1.15 --- ao_target.c 14 Jan 2014 15:31:50 -0000 1.16 *************** *** 836,840 **** unsigned mask; #endif - int pid; unsigned long temp; xp_opcode_t old_opcode; --- 836,839 ---- *************** *** 842,846 **** ip = GET_IPROC(xp); - pid = ip->ip_pid; if (p_old_opcode != NULL) --- 841,844 ---- *************** *** 1088,1092 **** #if AO_HAS_PTRACE_REGS ptrace_regs_t ptrace_regs, orig_ptrace_regs; ! ptrace_regs_t *regs, *orig_regs; #else taddr_t saved_regs[N_UREGS]; --- 1086,1090 ---- #if AO_HAS_PTRACE_REGS ptrace_regs_t ptrace_regs, orig_ptrace_regs; ! ptrace_regs_t *orig_regs; #else taddr_t saved_regs[N_UREGS]; *************** *** 1207,1211 **** ptrace_get_regtab(ip, &ptrace_regs); orig_ptrace_regs = ptrace_regs; - regs = &ptrace_regs; orig_regs = &orig_ptrace_regs; sp = xp_getreg(xp, UPSREG_SP); --- 1205,1208 ---- Index: obj_stack.c =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_stack.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** obj_stack.c 13 Jul 2009 13:47:37 -0000 1.7 --- obj_stack.c 14 Jan 2014 15:31:50 -0000 1.8 *************** *** 1452,1456 **** block_t *block; var_t *v; ! int found = 0, len, str_match; func_t *f; block_t *blocks; --- 1452,1456 ---- block_t *block; var_t *v; ! int found = 0, str_match; func_t *f; block_t *blocks; *************** *** 1488,1492 **** } } - len = strlen(name); for (v = blocks->bl_vars; v != NULL; v = v->va_next) { --- 1488,1491 ---- Index: trun_j.c =================================================================== RCS file: /cvsroot/ups/ups/ups/trun_j.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** trun_j.c 14 Jan 2014 14:34:12 -0000 1.7 --- trun_j.c 14 Jan 2014 15:31:51 -0000 1.8 *************** *** 101,105 **** int stop, sig; breakpoint_t *bp; - taddr_t orig_fp; bool check_wps; int emulated_wps, refresh_interval; --- 101,104 ---- *************** *** 107,112 **** cont_type_t cont_type = CT_CONT; - orig_fp = 0; /* but may be changed below */ - check_wps = FALSE; emulated_wps = 0; --- 106,109 ---- *************** *** 824,828 **** static char error_stackfile[] = "ups_stack.error"; taddr_t addrlim; ! jump_t *jumps, *j, *last_j; jumptype_t alt_jumptype; lno_t *lno, *old_lno; --- 821,825 ---- static char error_stackfile[] = "ups_stack.error"; taddr_t addrlim; ! jump_t *jumps, *j; jumptype_t alt_jumptype; lno_t *lno, *old_lno; *************** *** 916,922 **** */ if (first && out_range && !j->ju_dstaddr && j->ju_type == JT_CALL) ! for (last_j = j; j->ju_type == JT_CALL && !j->ju_dstaddr && ! j->ju_addr < nextaddr; ++j) ! last_j = j; /* if (first && out_range && j->ju_type == JT_BRANCH) for (; j->ju_type != JT_END && j->ju_addr <= pc; ++j);*/ --- 913,917 ---- */ if (first && out_range && !j->ju_dstaddr && j->ju_type == JT_CALL) ! while(j->ju_type == JT_CALL && !j->ju_dstaddr && j->ju_addr < nextaddr) j++; /* if (first && out_range && j->ju_type == JT_BRANCH) for (; j->ju_type != JT_END && j->ju_addr <= pc; ++j);*/ Index: ups.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ups.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ups.c 24 Nov 2003 13:28:58 -0000 1.8 --- ups.c 14 Jan 2014 15:31:51 -0000 1.9 *************** *** 1091,1095 **** bool attach; { - Region *root_region, *root_region1; window_t wn, wn1, wn2; func_t *f, *f1; --- 1091,1094 ---- *************** *** 1119,1123 **** td_set_window_flag(); - root_region = root_region1 = NULL; /* to satisfy gcc */ wn = wn1 = wn2 = -1; /* to satisfy gcc */ --- 1118,1121 ---- *************** *** 1192,1200 **** { wn_set_window_hints(wn1, "%a source","%a source", &ups_icon); ! root_region = divide_window_into_regions1(wn, want_outwin); ! root_region1 = divide_window_into_regions2(wn1, want_outwin); } else ! root_region = divide_window_into_regions(wn, want_outwin); } --- 1190,1198 ---- { wn_set_window_hints(wn1, "%a source","%a source", &ups_icon); ! divide_window_into_regions1(wn, want_outwin); ! divide_window_into_regions2(wn1, want_outwin); } else ! divide_window_into_regions(wn, want_outwin); } Index: va_edit.c =================================================================== RCS file: /cvsroot/ups/ups/ups/va_edit.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** va_edit.c 18 Feb 2004 11:04:22 -0000 1.8 --- va_edit.c 14 Jan 2014 15:31:51 -0000 1.9 *************** *** 1742,1751 **** dvar_t* dv; { ! type_t *type, *btype; var_t *v; int len; v = dv->dv_var; - type = get_type_at_level(v, dv->dv_ilevel); len = UNKNOWN_SIZE; --- 1742,1750 ---- dvar_t* dv; { ! type_t *btype; var_t *v; int len; v = dv->dv_var; len = UNKNOWN_SIZE; Index: ao_symparse.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_symparse.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ao_symparse.c 24 Nov 2003 11:12:19 -0000 1.6 --- ao_symparse.c 14 Jan 2014 15:31:50 -0000 1.7 *************** *** 253,261 **** int symno; bool got_match; - ao_stdata_t *ast; Symrec symrec; - ast = AO_STDATA(stf->stf_symtab); - got_match = FALSE; --- 253,258 ---- *************** *** 1485,1489 **** dim_t *dim; typecode_t utypecode; ! int is_struct, junk, const_type = 0; const char *s, *s1, *tag; char prior_chr; --- 1482,1486 ---- dim_t *dim; typecode_t utypecode; ! int is_struct, junk /*, const_type = 0 */; const char *s, *s1, *tag; char prior_chr; *************** *** 1564,1570 **** type_t *rtype = NULL; const char *s_old = s; ! if (*(s-1) == 'k') const_type = 1; rtype = TypeId(stf, sr, &s, eval, *(s - 1)); if (!rtype) --- 1561,1568 ---- type_t *rtype = NULL; const char *s_old = s; ! /* if (*(s-1) == 'k') const_type = 1; + */ rtype = TypeId(stf, sr, &s, eval, *(s - 1)); if (!rtype) *************** *** 2428,2432 **** const char *s; char prior_chr; ! type_t *type, *type1; int width = 0, offset; var_t *v = NULL; --- 2426,2430 ---- const char *s; char prior_chr; ! type_t *type; int width = 0, offset; var_t *v = NULL; *************** *** 2538,2542 **** prior_chr = *s == '\\' ? *(s-1) : *s; bump_str(sr, &s); ! type1 = TypeId(stf, sr, &s, eval, prior_chr); /* just ignore it */ } --- 2536,2540 ---- prior_chr = *s == '\\' ? *(s-1) : *s; bump_str(sr, &s); ! TypeId(stf, sr, &s, eval, prior_chr); /* just ignore it */ } Index: st_util.c =================================================================== RCS file: /cvsroot/ups/ups/ups/st_util.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** st_util.c 24 Nov 2003 13:21:50 -0000 1.3 --- st_util.c 14 Jan 2014 15:31:51 -0000 1.4 *************** *** 788,792 **** (!(fil->fi_flags & FI_DONE_MATCH) || rematch || reload)) { - lno_t *ln; int last_ln = 0, nlines, i, j, match = 0, file_access = -1, old_path_found = 0, max_pathlen; --- 788,791 ---- *************** *** 813,817 **** for (fl = fil->fi_funclist; fl; fl = fl->fl_next) { ! ln = FU_LNOS(fl->fl_func); if (!(fl->fl_func->fu_flags & FU_NOTHEADER)) { --- 812,816 ---- for (fl = fil->fi_funclist; fl; fl = fl->fl_next) { ! FU_LNOS(fl->fl_func); if (!(fl->fl_func->fu_flags & FU_NOTHEADER)) { Index: printf.c =================================================================== RCS file: /cvsroot/ups/ups/ups/printf.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** printf.c 26 Oct 2002 13:06:05 -0000 1.1.1.1 --- printf.c 14 Jan 2014 15:31:51 -0000 1.2 *************** *** 502,506 **** val_t val; args_t argdesc; ! const char *fmt, *save_fmt, *argstr; Outwin *ow; --- 502,506 ---- val_t val; args_t argdesc; ! const char *fmt, *argstr; Outwin *ow; *************** *** 519,523 **** return STOP; } ! save_fmt = fmt = (char *)val.v_value.vl_addr; while (*fmt != '\0') { --- 519,523 ---- return STOP; } ! fmt = (char *)val.v_value.vl_addr; while (*fmt != '\0') { Index: srcwin.c =================================================================== RCS file: /cvsroot/ups/ups/ups/srcwin.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** srcwin.c 21 Feb 2004 17:00:01 -0000 1.6 --- srcwin.c 14 Jan 2014 15:31:51 -0000 1.7 *************** *** 1651,1655 **** Outwin *dw; size_t buff_len, sol = 0; ! int width, height, i, j = 0, max_chars, sol_int = 0, buff_len_int, flag = 0, blank_text_len; char blank_text[256]; --- 1651,1655 ---- Outwin *dw; size_t buff_len, sol = 0; ! int width, height, i, j = 0, sol_int = 0, buff_len_int, flag = 0, blank_text_len; char blank_text[256]; *************** *** 1679,1683 **** wn_get_window_size(dw->wn, &width, &height); - max_chars = (int)width/Sysfont_width; buff_len = edit_get_buffer_length(dw->buffer); if (prepend_newline) --- 1679,1682 ---- *************** *** 1795,1799 **** { size_t buff_len, dstart, dlim, fstart, flim, point, sol; ! int pixel_offset, y = -1, ft_ht, y_offset, disp_wn, lx, ly, width, height, baseline, cur_posn, offset_lines = 0; bool clear, oldval; --- 1794,1798 ---- { size_t buff_len, dstart, dlim, fstart, flim, point, sol; ! int pixel_offset, y = -1, ft_ht, y_offset, lx, ly, width, height, baseline, cur_posn, offset_lines = 0; bool clear, oldval; *************** *** 1803,1807 **** if (display_area_overlay_control(0, 0) == 0) { - disp_wn = re_get_wn(get_display_area_region()); clear_selection(); display_area_overlay_control(1, 0); /* set */ --- 1802,1805 ---- Index: ao_dwftext.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwftext.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ao_dwftext.c 7 Jul 2009 15:42:44 -0000 1.11 --- ao_dwftext.c 14 Jan 2014 15:31:50 -0000 1.12 *************** *** 161,168 **** func_t *f; { - fsyminfo_t *fs; symtab_t *st; stf_t *stf; - ao_stdata_t *ast; /* --- 161,166 ---- *************** *** 173,178 **** st = f->fu_symtab; - fs = AO_FSYMDATA(f); - ast = AO_STDATA(st); /* --- 171,174 ---- *************** *** 265,269 **** { symtab_t *st; - ao_stdata_t *ast; stf_t *stf; /* snlist_t *sn; */ --- 261,264 ---- *************** *** 284,288 **** st = fil->fi_symtab; - ast = AO_STDATA(st); stf = AO_FIDATA(fil); --- 279,282 ---- Index: ci_decl.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ci_decl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ci_decl.c 4 Nov 2002 15:28:31 -0000 1.2 --- ci_decl.c 14 Jan 2014 15:31:50 -0000 1.3 *************** *** 513,519 **** prev = NULL; for (v = aggr_members; v != NULL; prev = v, v = v->va_next) { - typecode_t vcode; - - vcode = v->va_type->ty_code; if (v->va_type->ty_code == TY_BITFIELD) { if (typecode != TY_STRUCT) --- 513,516 ---- Index: xc_text.c =================================================================== RCS file: /cvsroot/ups/ups/ups/xc_text.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** xc_text.c 14 Jan 2014 14:34:12 -0000 1.13 --- xc_text.c 14 Jan 2014 15:31:51 -0000 1.14 *************** *** 1041,1045 **** textword_t *pc, *fpc; int i; - func_retval_t retval; ma = GET_XTD(xp)->xp_machine; --- 1041,1044 ---- *************** *** 1048,1052 **** pc = ma->ma_pc; cf = ma->ma_codefile; - retval = ma->ma_retval; for (i = nargs - 1; i >= 0; --i) --- 1047,1050 ---- Index: ci_func.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ci_func.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ci_func.c 26 Oct 2002 13:06:16 -0000 1.1.1.1 --- ci_func.c 14 Jan 2014 15:31:50 -0000 1.2 *************** *** 62,69 **** bool is_definition; { - const char *name; goto_label_t *gl; - name = id->id_name; for (gl = Labels; gl != NULL; gl = gl->gl_next) if (strcmp(id->id_name, gl->gl_name) == 0) --- 62,67 ---- Index: ao_ptrace.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_ptrace.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ao_ptrace.c 14 Oct 2010 14:22:49 -0000 1.14 --- ao_ptrace.c 14 Jan 2014 15:31:50 -0000 1.15 *************** *** 81,84 **** --- 81,85 ---- #include "tdr.h" #include "state.h" + #include "obj_bpt.h" *************** *** 467,471 **** target_t *xp; { - wait_arg_t status; iproc_t *ip; --- 468,471 ---- *************** *** 481,492 **** if (ip->ip_attached) { /* wait() hangs on a PTRACE_ATTACH process which ! * has been killed, so fake the status. */ - #ifdef WAIT_STATUS_IS_INT - status = SIGKILL; - #else - status.w_T.w_Termsig = SIGKILL; - status.w_T.w_Retcode = 0; - #endif } else { --- 481,486 ---- if (ip->ip_attached) { /* wait() hangs on a PTRACE_ATTACH process which ! * has been killed. */ } else { Index: va_menu.c =================================================================== RCS file: /cvsroot/ups/ups/ups/va_menu.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** va_menu.c 20 Dec 2005 12:43:12 -0000 1.6 --- va_menu.c 14 Jan 2014 15:31:51 -0000 1.7 *************** *** 1655,1660 **** const char *mesg; var_t *v, *sub_v; ! bool hide_ptr; ! int is_ptr_to_func, len, found = 0, str_match; taddr_t addr; type_t *btype; --- 1655,1659 ---- const char *mesg; var_t *v, *sub_v; ! int is_ptr_to_func, found = 0, str_match; taddr_t addr; type_t *btype; *************** *** 1675,1679 **** v = dv->dv_var; - hide_ptr = (v->va_flags & VA_HIDE_PTR) != 0; type = get_type_at_level(v, dv->dv_ilevel); --- 1674,1677 ---- *************** *** 1710,1714 **** } - len = strlen(name); for (v = type->ty_aggr_or_enum->ae_aggr_members; v != NULL; v = v->va_next) { --- 1708,1711 ---- Index: exec.c =================================================================== RCS file: /cvsroot/ups/ups/ups/exec.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** exec.c 22 Nov 2007 10:53:46 -0000 1.5 --- exec.c 14 Jan 2014 15:31:50 -0000 1.6 *************** *** 109,113 **** target_t *xp; ! bool want_refresh, target_updated = FALSE; stopres_t stopres = SR_FAILED; /* RGA as per Callum Gibson ca...@ba... */ --- 109,113 ---- target_t *xp; ! bool target_updated = FALSE; stopres_t stopres = SR_FAILED; /* RGA as per Callum Gibson ca...@ba... */ *************** *** 120,125 **** xp = get_current_target(); - want_refresh = TRUE; - switch(command) { case MR_TGT_CONT: --- 120,123 ---- Index: ao_dwftype.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwftype.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ao_dwftype.c 14 Jan 2014 12:39:53 -0000 1.17 --- ao_dwftype.c 14 Jan 2014 15:31:50 -0000 1.18 *************** *** 662,666 **** { dtype_t *dt; ! type_t *type, *base; /* --- 662,666 ---- { dtype_t *dt; ! type_t *type; /* *************** *** 682,686 **** dt = dwf_make_dtype(dbg, die, ap, stf, DT_IS_TYPE, &(type->ty_base), type); ! base = dwf_try_resolve_base_type(dbg, die, ap, stf, dt); return dt; --- 682,686 ---- dt = dwf_make_dtype(dbg, die, ap, stf, DT_IS_TYPE, &(type->ty_base), type); ! dwf_try_resolve_base_type(dbg, die, ap, stf, dt); return dt; Index: obj_bpt.c =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_bpt.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** obj_bpt.c 14 Jan 2014 14:34:12 -0000 1.8 --- obj_bpt.c 14 Jan 2014 15:31:50 -0000 1.9 *************** *** 1350,1353 **** --- 1350,1354 ---- taddr_t addr1; bpdesc_t *bd1 = NULL; + int lnum1; #endif /* OS_SUNOS */ fval_t fields[FN_BPT_LAST + 1]; *************** *** 1356,1363 **** const char *fname; fil_t *fil; ! int lnum, lnum1, ret, method_call = 0, multi_func = 0, lnum_n; taddr_t addr; target_t *xp; - objid_t obj_n; xp = get_current_target(); --- 1357,1363 ---- const char *fname; fil_t *fil; ! int lnum, ret, method_call = 0, lnum_n; taddr_t addr; target_t *xp; xp = get_current_target(); *************** *** 1392,1397 **** int ans, ans_stat, first_only = 0; - multi_func = 1; - if (funchead->fl_next) { --- 1392,1395 ---- *************** *** 1415,1419 **** --- 1413,1419 ---- get_min_bpt_addr(f, &addr, FALSE); addr_to_fil_and_lnum(f, addr, &fil, &lnum, FALSE); + #ifdef OS_SUNOS lnum1 = lnum; + #endif /* OS_SUNOS */ if (first_only) break; *************** *** 1425,1429 **** if (!lnum_n) lnum_n = -1; /* allow multiple breakpoints in libraries */ ! obj_n = add_breakpoint_object(fl->fl_func, fil, lnum_n, TRUE); } do_free_func_bp_list_list(funchead); --- 1425,1429 ---- if (!lnum_n) lnum_n = -1; /* allow multiple breakpoints in libraries */ ! add_breakpoint_object(fl->fl_func, fil, lnum_n, TRUE); } do_free_func_bp_list_list(funchead); *************** *** 1475,1479 **** if (funchead) { - multi_func = 1; if (method_call) errf("\bPlacing multiple breakpoints in overloaded/multiply linked methods"); --- 1475,1478 ---- *************** *** 1489,1493 **** if (!lnum_n) lnum_n = -1; /* allow multiple breakpoints in libraries */ ! obj_n = add_breakpoint_object(fl->fl_func, fil, lnum_n, TRUE); } do_free_func_bp_list_list(funchead); --- 1488,1492 ---- if (!lnum_n) lnum_n = -1; /* allow multiple breakpoints in libraries */ ! add_breakpoint_object(fl->fl_func, fil, lnum_n, TRUE); } do_free_func_bp_list_list(funchead); *************** *** 2331,2335 **** for (fl = funchead; fl != NULL; fl = fl->fl_next) { - objid_t obj_n; fil_t *fil; int lnum; --- 2330,2333 ---- *************** *** 2347,2351 **** if (!lnum) lnum = -1; /* allow multiple breakpoints in libraries */ ! obj_n = add_breakpoint_object(fl->fl_func, fil, lnum, TRUE); } do_free_func_bp_list_list(funchead); --- 2345,2349 ---- if (!lnum) lnum = -1; /* allow multiple breakpoints in libraries */ ! add_breakpoint_object(fl->fl_func, fil, lnum, TRUE); } do_free_func_bp_list_list(funchead); Index: ao_symload.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_symload.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ao_symload.c 20 Dec 2005 12:43:12 -0000 1.8 --- ao_symload.c 14 Jan 2014 15:31:50 -0000 1.9 *************** *** 155,165 **** { ! stf_t *stf, *stf_next; ! int symno, min_symno, max_symno; /* cursor_t old_cursor; */ static int checked = 0; static Compiler_type sym; static char *c_str = NULL; - symtab_t *st; Symrec symrec; nlist_t nm; --- 155,167 ---- { ! stf_t *stf; ! int symno, max_symno; ! #ifndef AO_ELF ! int min_symno; ! #endif /* cursor_t old_cursor; */ static int checked = 0; static Compiler_type sym; static char *c_str = NULL; Symrec symrec; nlist_t nm; *************** *** 180,193 **** #endif - min_symno = 0; stf = AO_FIDATA(fil); if (fil->fi_next) { ! stf_next = AO_FIDATA(fil->fi_next); if (stf_next) min_symno = stf_next->stf_symno; } - st = stf->stf_symtab; if (!checked) { --- 182,196 ---- #endif stf = AO_FIDATA(fil); + #ifndef AO_ELF + min_symno = 0; if (fil->fi_next) { ! stf_t *stf_next = AO_FIDATA(fil->fi_next); if (stf_next) min_symno = stf_next->stf_symno; } + #endif if (!checked) { *************** *** 1640,1644 **** --- 1643,1649 ---- lno_t dummy_lno, *last; lno_t *lno = NULL; + #ifndef AO_ELF ao_stdata_t *ast; + #endif int max_lnum; symio_t *symio; *************** *** 1653,1662 **** return f->fu__lnos; - ast = AO_STDATA(f->fu_symtab); - #ifdef AO_ELF if (!elf_scan_then_setup_symio(f->fu_fil, &symio)) return NULL; #else symio = ast->st_text_symio; #endif --- 1658,1667 ---- return f->fu__lnos; #ifdef AO_ELF if (!elf_scan_then_setup_symio(f->fu_fil, &symio)) return NULL; #else + ast = AO_STDATA(f->fu_symtab); + symio = ast->st_text_symio; #endif Index: reg.c =================================================================== RCS file: /cvsroot/ups/ups/ups/reg.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** reg.c 24 Nov 2003 13:28:58 -0000 1.4 --- reg.c 14 Jan 2014 15:31:51 -0000 1.5 *************** *** 881,885 **** EV_INTERRUPT | EV_WINDOW_EXPOSED | EV_WINDOW_RESIZED; Region *root; - int last_cursor; int last_wn = -1; static const char **last_mhcaps; --- 881,884 ---- *************** *** 887,892 **** wn_set_close_func(close_window); - last_cursor = -1; - while (!Quit_event_loop) { bool resized = FALSE; --- 886,889 ---- Index: expr.c =================================================================== RCS file: /cvsroot/ups/ups/ups/expr.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** expr.c 16 Feb 2004 13:02:00 -0000 1.4 --- expr.c 14 Jan 2014 15:31:50 -0000 1.5 *************** *** 721,727 **** fil_t *fil; int oldstate, selected_one, found_a_member, ntimes, sepc; - bool oldval; ! oldval = td_set_select_recording(FALSE); fil = get_displayed_fil(); --- 721,726 ---- fil_t *fil; int oldstate, selected_one, found_a_member, ntimes, sepc; ! td_set_select_recording(FALSE); fil = get_displayed_fil(); Index: ao_dwfsyms.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfsyms.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ao_dwfsyms.c 14 Jan 2014 12:39:53 -0000 1.31 --- ao_dwfsyms.c 14 Jan 2014 15:31:50 -0000 1.32 *************** *** 416,421 **** Dwarf_Die die; Dwarf_Half tag; - snlist_t *sn; - alloc_pool_t *ap; char *global_name; --- 416,419 ---- *************** *** 423,427 **** * Initalise */ - ap = st->st_apool; dbg = stf->stf_dw_dbg; die = (Dwarf_Die)0; --- 421,424 ---- *************** *** 460,464 **** case DW_TAG_variable: ! sn = dwf_add_globalvar_to_symtab(st, stf, strdup(global_name)); break; --- 457,461 ---- case DW_TAG_variable: ! dwf_add_globalvar_to_symtab(st, stf, strdup(global_name)); break; *************** *** 499,506 **** int i; Dwarf_Debug dbg; - long rel_offset; Dwarf_Die die, spec_die; Dwarf_Half tag; - snlist_t *sn; block_t *bl_head = NULL; aggr_or_enum_def_t *ae; --- 496,501 ---- *************** *** 508,515 **** dtype_t *dt; type_t *type; - bool is_static; char *name; dwload_t dw_what_next; - bool ok; bool descend; --- 503,508 ---- *************** *** 535,545 **** } - /* Offset in CU is very useful when debugging. */ - rel_offset = (long)dwf_cu_offset_of_die(dbg, die); - /* * What sort of item : function, variable, ... ? */ - ok = FALSE; descend = FALSE; dw_what_next = dw_what; /* in most cases */ --- 528,534 ---- *************** *** 630,636 **** */ spec_die = dwf_find_spec_die(dbg, die); - is_static = !dwf_get_opt_flag(dbg, spec_die, DW_AT_external); name = dwf_get_string(dbg, ap, spec_die, DW_AT_name); ! sn = dwf_add_globalvar_to_symtab(st, stf, name); } } else if ((dw_level == 1) && (dw_what & DWL_TOP_VARS)) { --- 619,624 ---- */ spec_die = dwf_find_spec_die(dbg, die); name = dwf_get_string(dbg, ap, spec_die, DW_AT_name); ! dwf_add_globalvar_to_symtab(st, stf, name); } } else if ((dw_level == 1) && (dw_what & DWL_TOP_VARS)) { *************** *** 834,843 **** case DW_TAG_enumerator: if (dw_what & DWL_ENUM_MEMBERS) { - enum_member_t *em; /* * Enumeration member */ ae = parent_dt->dt_type->ty_aggr_or_enum; ! em = dwf_make_enumerator(dbg, die, ap, stf, ae); } break; --- 822,830 ---- case DW_TAG_enumerator: if (dw_what & DWL_ENUM_MEMBERS) { /* * Enumeration member */ ae = parent_dt->dt_type->ty_aggr_or_enum; ! dwf_make_enumerator(dbg, die, ap, stf, ae); } break; Index: ao_aflist.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_aflist.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ao_aflist.c 26 Oct 2002 13:05:14 -0000 1.1.1.1 --- ao_aflist.c 14 Jan 2014 15:31:50 -0000 1.2 *************** *** 244,250 **** for (fl = dummy_fil->fi_funclist; fl != NULL; fl = fl->fl_next) { ! Fil_list *sf, *prev; ! ! prev = NULL; for (sf = af->stab_fils; sf != NULL; sf = sf->next) { --- 244,248 ---- for (fl = dummy_fil->fi_funclist; fl != NULL; fl = fl->fl_next) { ! Fil_list *sf; for (sf = af->stab_fils; sf != NULL; sf = sf->next) { *************** *** 307,315 **** resolve_aflist(func_t *funclist, Ambig_fil *aflist) { ! Ambig_fil *af, *new_aflist; func_t *f; - new_aflist = NULL; - for (af = aflist; af != NULL; af = af->next) { fil_t *df; --- 305,311 ---- resolve_aflist(func_t *funclist, Ambig_fil *aflist) { ! Ambig_fil *af; func_t *f; for (af = aflist; af != NULL; af = af->next) { fil_t *df; Index: ao_elfsym.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfsym.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ao_elfsym.c 8 Jul 2009 11:53:29 -0000 1.16 --- ao_elfsym.c 14 Jan 2014 15:31:50 -0000 1.17 *************** *** 186,197 **** symio_t *symio, int nsyms, const char **p_mainfunc_name) { ! int symno, opt_with_no_optsym; off_t file_offset, next_file_offset; ! const char *objdir, *path_hint, *prefix; ! size_t pflen; stf_t *stf; fil_t *new_sfiles; block_t *rootblock; - const char *mainfunc_name; alloc_pool_t *ap; bool seen_sosym_but_no_optsym; --- 186,195 ---- symio_t *symio, int nsyms, const char **p_mainfunc_name) { ! int symno /*, opt_with_no_optsym */; off_t file_offset, next_file_offset; ! const char *objdir, *path_hint; stf_t *stf; fil_t *new_sfiles; block_t *rootblock; alloc_pool_t *ap; bool seen_sosym_but_no_optsym; *************** *** 205,213 **** rootblock = get_rootblock(); ap = st->st_apool; - prefix = NULL; - pflen = 0; - mainfunc_name = NULL; seen_sosym_but_no_optsym = FALSE; ! opt_with_no_optsym = 0; lang = LANG_UNKNOWN; --- 203,208 ---- rootblock = get_rootblock(); ap = st->st_apool; seen_sosym_but_no_optsym = FALSE; ! /* opt_with_no_optsym = 0; */ lang = LANG_UNKNOWN; *************** *** 273,279 **** lang = srctype(path); - prefix = stf->stf_global_prefix; - pflen = (prefix != NULL) ? strlen(prefix) : 0; - seen_sosym_but_no_optsym = TRUE; --- 268,271 ---- *************** *** 318,330 **** if (!has_debug_syms && (stf->stf_flags & STF_NEED_SYMSCAN) != 0) { - prefix = NULL; - pflen = 0; stf = NULL; new_sfiles = new_sfiles->fi_next; } - else { - prefix = stf->stf_global_prefix; - pflen = (prefix != NULL) ? strlen(prefix) : 0; - } break; --- 310,316 ---- Index: srcbuf.c =================================================================== RCS file: /cvsroot/ups/ups/ups/srcbuf.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** srcbuf.c 16 Jul 2003 10:00:30 -0000 1.3 --- srcbuf.c 14 Jan 2014 15:31:51 -0000 1.4 *************** *** 274,284 **** int lim_ypos, editline_height, srcline_height, *p_lnum, *p_ypos; { ! int ypos, mixedline_height; size_t offset, ebstart, *lptr, *llim; Editblock *eb; - mixedline_height = (editline_height > srcline_height) ? - editline_height : srcline_height; - offset = 0; ypos = 0; --- 274,281 ---- int lim_ypos, editline_height, srcline_height, *p_lnum, *p_ypos; { ! int ypos; size_t offset, ebstart, *lptr, *llim; Editblock *eb; offset = 0; ypos = 0; Index: obj_wpt.c =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_wpt.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** obj_wpt.c 23 Aug 2005 09:35:20 -0000 1.4 --- obj_wpt.c 14 Jan 2014 15:31:51 -0000 1.5 *************** *** 559,563 **** { int oldstate; - wpdesc_t *wd; if (command == MR_WPTMEN_ACCELERATOR_ACTION) --- 559,562 ---- *************** *** 567,572 **** oldstate = td_set_obj_updating(OBJ_UPDATING_OFF); - wd = (wpdesc_t *)obj; - switch(command) { case MR_WPTMEN_REMOVE: --- 566,569 ---- |
From: Tom H. <th...@us...> - 2014-01-14 14:34:14
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5523/ups Modified Files: cg.c ci.h ci_compile_expr.c obj_bpt.c obj_bpt.h trun_j.c trun_ss.c va_expr.c xc.c xc_machine.c xc_opcodes.h xc_text.c Log Message: Handle SP relative variables in the C interpreter. Index: cg.c =================================================================== RCS file: /cvsroot/ups/ups/ups/cg.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cg.c 21 Jun 2006 16:25:27 -0000 1.3 --- cg.c 14 Jan 2014 14:34:11 -0000 1.4 *************** *** 131,135 **** ci_initialise_machine(ma, FALSE, FALSE, argv, envp); ! res = ci_execute_machine(ma, (taddr_t)0, (taddr_t)0, (taddr_t)0, noread, nowrite, (ci_indirect_call_proc_t)NULL); --- 131,135 ---- ci_initialise_machine(ma, FALSE, FALSE, argv, envp); ! res = ci_execute_machine(ma, (taddr_t)0, (taddr_t)0, (taddr_t)0, (taddr_t)0, noread, nowrite, (ci_indirect_call_proc_t)NULL); Index: ci.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ci.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ci.h 21 Jun 2006 16:25:27 -0000 1.3 --- ci.h 14 Jan 2014 14:34:12 -0000 1.4 *************** *** 246,250 **** ci_exec_result_t ci_execute_machine PROTO((machine_t *machine, unsigned long procfp, unsigned long procap, ! unsigned long proccfa, ci_readproc_t readproc, ci_writeproc_t writeproc, ci_indirect_call_proc_t indirect_call_proc)); --- 246,250 ---- ci_exec_result_t ci_execute_machine PROTO((machine_t *machine, unsigned long procfp, unsigned long procap, ! unsigned long procsp, unsigned long proccfa, ci_readproc_t readproc, ci_writeproc_t writeproc, ci_indirect_call_proc_t indirect_call_proc)); Index: xc_text.c =================================================================== RCS file: /cvsroot/ups/ups/ups/xc_text.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** xc_text.c 13 Jul 2009 13:47:37 -0000 1.12 --- xc_text.c 14 Jan 2014 14:34:12 -0000 1.13 *************** *** 539,543 **** case CT_CONT: res = ci_execute_machine(ma, ! (textaddr_t)0, (textaddr_t)0, (textaddr_t)0, (ci_readproc_t)NULL, (ci_writeproc_t)NULL, (ci_indirect_call_proc_t)NULL); --- 539,544 ---- case CT_CONT: res = ci_execute_machine(ma, ! (textaddr_t)0, (textaddr_t)0, ! (textaddr_t)0, (textaddr_t)0, (ci_readproc_t)NULL, (ci_writeproc_t)NULL, (ci_indirect_call_proc_t)NULL); *************** *** 588,592 **** res = ci_execute_machine(ma, ! (textaddr_t)0, (textaddr_t)0, (textaddr_t)0, (ci_readproc_t)NULL, (ci_writeproc_t)NULL, (ci_indirect_call_proc_t)NULL); --- 589,594 ---- res = ci_execute_machine(ma, ! (textaddr_t)0, (textaddr_t)0, ! (textaddr_t)0, (textaddr_t)0, (ci_readproc_t)NULL, (ci_writeproc_t)NULL, (ci_indirect_call_proc_t)NULL); *************** *** 1069,1073 **** ma->ma_codefile = fcf; ! ci_execute_machine(ma, (textaddr_t)NULL, (textaddr_t)NULL, (textaddr_t)NULL, (ci_readproc_t)NULL, (ci_writeproc_t)NULL, (ci_indirect_call_proc_t)NULL); --- 1071,1076 ---- ma->ma_codefile = fcf; ! ci_execute_machine(ma, (textaddr_t)NULL, (textaddr_t)NULL, ! (textaddr_t)NULL, (textaddr_t)NULL, (ci_readproc_t)NULL, (ci_writeproc_t)NULL, (ci_indirect_call_proc_t)NULL); Index: ci_compile_expr.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ci_compile_expr.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ci_compile_expr.c 16 Mar 2012 14:57:49 -0000 1.8 --- ci_compile_expr.c 14 Jan 2014 14:34:12 -0000 1.9 *************** *** 735,740 **** --- 735,744 ---- generic_opcode = OC_PROC_PUSH_FP_ADDR_B; break; + case OP_SP_RELATIVE: + generic_opcode = OC_PROC_PUSH_SP_ADDR_B; + break; default: panic("unhandled op in cvr"); + break; } } else { *************** *** 779,784 **** --- 783,792 ---- generic_opcode = OC_PROC_PUSH_FP_ADDR_B; break; + case OP_SP_RELATIVE: + generic_opcode = OC_PROC_PUSH_SP_ADDR_B; + break; default: panic("unhandled op in cvr"); + break; } } else { Index: xc.c =================================================================== RCS file: /cvsroot/ups/ups/ups/xc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xc.c 21 Jun 2006 16:25:27 -0000 1.3 --- xc.c 14 Jan 2014 14:34:12 -0000 1.4 *************** *** 127,131 **** exit(1); ! res = ci_execute_machine(ma, (taddr_t)0, (taddr_t)0, (taddr_t)0, noread, nowrite, (ci_indirect_call_proc_t)NULL); --- 127,131 ---- exit(1); ! res = ci_execute_machine(ma, (taddr_t)0, (taddr_t)0, (taddr_t)0, (taddr_t)0, noread, nowrite, (ci_indirect_call_proc_t)NULL); Index: va_expr.c =================================================================== RCS file: /cvsroot/ups/ups/ups/va_expr.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** va_expr.c 13 Jan 2014 22:42:17 -0000 1.9 --- va_expr.c 14 Jan 2014 14:34:12 -0000 1.10 *************** *** 917,921 **** bool change_caused_by_edit; { ! taddr_t fp, ap, cfa, junk; dexpr_t *de; bool lose_descendents; --- 917,921 ---- bool change_caused_by_edit; { ! taddr_t fp, ap, sp, cfa; dexpr_t *de; bool lose_descendents; *************** *** 943,947 **** fp = ap = 0; else ! get_stack_func(par, &fp, &ap, &junk, &cfa); Expr_type = NULL; --- 943,947 ---- fp = ap = 0; else ! get_stack_func(par, &fp, &ap, &sp, &cfa); Expr_type = NULL; *************** *** 949,953 **** (char **)NULL, (char **)NULL); ! res = ci_execute_machine(de->de_machine, fp, ap, cfa, read_data, nowrite, set_expr_result); --- 949,953 ---- (char **)NULL, (char **)NULL); ! res = ci_execute_machine(de->de_machine, fp, ap, sp, cfa, read_data, nowrite, set_expr_result); *************** *** 1307,1311 **** { objid_t par; ! taddr_t fp, ap, cfa, junk; fil_t *fil; int lnum; --- 1307,1311 ---- { objid_t par; ! taddr_t junk; fil_t *fil; int lnum; *************** *** 1325,1329 **** fil = (fil_t *)par; else ! fil = get_stack_func(par, &fp, &ap, &junk, &cfa)->fu_fil; lnum = de->de_block->bl_start_lnum; --- 1325,1329 ---- fil = (fil_t *)par; else ! fil = get_stack_func(par, &junk, &junk, &junk, &junk)->fu_fil; lnum = de->de_block->bl_start_lnum; *************** *** 1341,1345 **** if (cr->cr_machine != NULL && cr->cr_parse_id != NULL) { ! taddr_t fp, ap, cfa, junk; ci_exec_result_t res; objid_t par; --- 1341,1345 ---- if (cr->cr_machine != NULL && cr->cr_parse_id != NULL) { ! taddr_t fp, ap, sp, cfa; ci_exec_result_t res; objid_t par; *************** *** 1349,1353 **** fp = ap = 0; else ! get_stack_func(par, &fp, &ap, &junk, &cfa); Expr_type = NULL; --- 1349,1353 ---- fp = ap = 0; else ! get_stack_func(par, &fp, &ap, &sp, &cfa); Expr_type = NULL; *************** *** 1355,1359 **** (char **)NULL, (char **)NULL); ! res = ci_execute_machine(cr->cr_machine, fp, ap, cfa, read_data, nowrite, set_expr_result); --- 1355,1359 ---- (char **)NULL, (char **)NULL); ! res = ci_execute_machine(cr->cr_machine, fp, ap, sp, cfa, read_data, nowrite, set_expr_result); *************** *** 1388,1392 **** { objid_t par; ! taddr_t fp, ap, cfa, junk; fil_t *fil; int lnum; --- 1388,1392 ---- { objid_t par; ! taddr_t fp, ap, sp, cfa, junk; fil_t *fil; int lnum; *************** *** 1401,1405 **** fil = (fil_t *)par; else ! fil = get_stack_func(par, &fp, &ap, &junk, &cfa)->fu_fil; lnum = de->de_block->bl_start_lnum; --- 1401,1405 ---- fil = (fil_t *)par; else ! fil = get_stack_func(par, &junk, &junk, &junk, &junk)->fu_fil; lnum = de->de_block->bl_start_lnum; *************** *** 1431,1435 **** fp = ap = 0; else ! get_stack_func(par, &fp, &ap, &junk, &cfa); Expr_type = NULL; --- 1431,1435 ---- fp = ap = 0; else ! get_stack_func(par, &fp, &ap, &sp, &cfa); Expr_type = NULL; *************** *** 1437,1441 **** (char **)NULL, (char **)NULL); ! res = ci_execute_machine(cr->cr_machine, fp, ap, cfa, read_data, nowrite, set_expr_result); --- 1437,1441 ---- (char **)NULL, (char **)NULL); ! res = ci_execute_machine(cr->cr_machine, fp, ap, sp, cfa, read_data, nowrite, set_expr_result); Index: trun_ss.c =================================================================== RCS file: /cvsroot/ups/ups/ups/trun_ss.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** trun_ss.c 21 Jun 2006 16:25:27 -0000 1.6 --- trun_ss.c 14 Jan 2014 14:34:12 -0000 1.7 *************** *** 212,215 **** --- 212,216 ---- xp_getreg(xp, UPSREG_FP), xp_getreg(xp, UPSREG_AP), + xp_getreg(xp, UPSREG_SP), xp_getcfa(xp)); stopres = xp_get_stopres(xp); *************** *** 254,257 **** --- 255,259 ---- xp_getreg(xp, UPSREG_FP), xp_getreg(xp, UPSREG_AP), + xp_getreg(xp, UPSREG_SP), xp_getcfa(xp)); stopres = xp_get_stopres(xp); Index: obj_bpt.c =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_bpt.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** obj_bpt.c 22 Nov 2007 15:37:28 -0000 1.7 --- obj_bpt.c 14 Jan 2014 14:34:12 -0000 1.8 *************** *** 133,137 **** bpdesc_t *bd)); static bool execute_bp_code_internal PROTO((breakpoint_t *bp, ! taddr_t fp, taddr_t ap, taddr_t cfa, int button)); static void set_bpt_location PROTO((fval_t *fields, func_t *f, int lnum)); --- 133,138 ---- bpdesc_t *bd)); static bool execute_bp_code_internal PROTO((breakpoint_t *bp, ! taddr_t fp, taddr_t ap, ! taddr_t sp, taddr_t cfa, int button)); static void set_bpt_location PROTO((fval_t *fields, func_t *f, int lnum)); *************** *** 1602,1608 **** static bool ! execute_bp_code_internal(bp, fp, ap, cfa, button) breakpoint_t *bp; ! taddr_t fp, ap, cfa; int button; { --- 1603,1609 ---- static bool ! execute_bp_code_internal(bp, fp, ap, sp, cfa, button) breakpoint_t *bp; ! taddr_t fp, ap, sp, cfa; int button; { *************** *** 1646,1650 **** } ! res = ci_execute_machine(bd->machine, fp, ap, cfa, read_data, write_data, call_target_function); --- 1647,1651 ---- } ! res = ci_execute_machine(bd->machine, fp, ap, sp, cfa, read_data, write_data, call_target_function); *************** *** 1656,1662 **** bool ! execute_bp_code(bp, fp, ap, cfa) breakpoint_t *bp; ! taddr_t fp, ap, cfa; { if (!global_bp_enabled(0, 0)) --- 1657,1663 ---- bool ! execute_bp_code(bp, fp, ap, sp, cfa) breakpoint_t *bp; ! taddr_t fp, ap, sp, cfa; { if (!global_bp_enabled(0, 0)) *************** *** 1666,1670 **** return TRUE; ! return (execute_bp_code_internal(bp, fp, ap, cfa, 0)); } --- 1667,1671 ---- return TRUE; ! return (execute_bp_code_internal(bp, fp, ap, sp, cfa, 0)); } *************** *** 1948,1951 **** --- 1949,1953 ---- xp_getreg(xp, UPSREG_FP), xp_getreg(xp, UPSREG_AP), + xp_getreg(xp, UPSREG_SP), xp_getcfa(xp), 1); update_variable_values(); Index: obj_bpt.h =================================================================== RCS file: /cvsroot/ups/ups/ups/obj_bpt.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** obj_bpt.h 21 Jun 2006 16:25:27 -0000 1.3 --- obj_bpt.h 14 Jan 2014 14:34:12 -0000 1.4 *************** *** 30,34 **** bool remove_vars, bool append)); void recalculate_bpt_addrs PROTO((target_t *xp)); ! bool execute_bp_code PROTO((breakpoint_t *bp, taddr_t fp, taddr_t ap, taddr_t cfa)); #endif --- 30,35 ---- bool remove_vars, bool append)); void recalculate_bpt_addrs PROTO((target_t *xp)); ! bool execute_bp_code PROTO((breakpoint_t *bp, taddr_t fp, taddr_t ap, ! taddr_t sp, taddr_t cfa)); #endif Index: xc_machine.c =================================================================== RCS file: /cvsroot/ups/ups/ups/xc_machine.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** xc_machine.c 13 Jan 2014 22:42:17 -0000 1.8 --- xc_machine.c 14 Jan 2014 14:34:12 -0000 1.9 *************** *** 897,901 **** ma->ma_sp = sp; ma->ma_pc = text; ! res = ci_execute_machine(ma, (textaddr_t)0, (textaddr_t)0, (textaddr_t)0, (ci_readproc_t)NULL, (ci_writeproc_t)NULL, (ci_indirect_call_proc_t)NULL); --- 897,902 ---- ma->ma_sp = sp; ma->ma_pc = text; ! res = ci_execute_machine(ma, (textaddr_t)0, (textaddr_t)0, ! (textaddr_t)0, (textaddr_t)0, (ci_readproc_t)NULL, (ci_writeproc_t)NULL, (ci_indirect_call_proc_t)NULL); *************** *** 947,953 **** ci_exec_result_t ! ci_execute_machine(ma, procfp, procap, proccfa, readproc, writeproc, indirect_call_proc) machine_t *ma; ! textaddr_t procfp, procap, proccfa; ci_readproc_t readproc; ci_writeproc_t writeproc; --- 948,954 ---- ci_exec_result_t ! ci_execute_machine(ma, procfp, procap, procsp, proccfa, readproc, writeproc, indirect_call_proc) machine_t *ma; ! textaddr_t procfp, procap, procsp, proccfa; ci_readproc_t readproc; ci_writeproc_t writeproc; *************** *** 2237,2240 **** --- 2238,2257 ---- BREAK; + CASE OC_PROC_PUSH_SP_ADDR_B: + PUSH((stackword_t)(procsp + *pc++), sp); + BREAK; + CASE OC_PROC_PUSH_SP_ADDR_W: + PUSH((stackword_t)(procsp + GETWORD(pc)), sp); + pc += 2; + BREAK; + CASE OC_PROC_PUSH_SP_ADDR_L: + PUSH((stackword_t)(procsp + GETLONG(pc)), sp); + pc += 4; + BREAK; + CASE OC_PROC_PUSH_SP_ADDR_Q: + PUSH((stackword_t)(procsp + GETQUAD(pc)), sp); + pc += 8; + BREAK; + CASE OC_PROC_PUSH_CFA_ADDR_B: PUSH((stackword_t)(proccfa + *pc++), sp); Index: trun_j.c =================================================================== RCS file: /cvsroot/ups/ups/ups/trun_j.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** trun_j.c 21 Jun 2006 16:25:27 -0000 1.6 --- trun_j.c 14 Jan 2014 14:34:12 -0000 1.7 *************** *** 188,191 **** --- 188,192 ---- stop = execute_bp_code(bp, xp_getreg(xp, UPSREG_FP), xp_getreg(xp, UPSREG_AP), + xp_getreg(xp, UPSREG_SP), xp_getcfa(xp)); stopres = xp_get_stopres(xp); *************** *** 655,658 **** --- 656,660 ---- execute_bp_code(bp_at_nextline, fp, xp_getreg(xp, UPSREG_AP), + xp_getreg(xp, UPSREG_SP), xp_getcfa(xp)); stopres = xp_get_stopres(xp); *************** *** 787,790 **** --- 789,793 ---- xp_getreg(xp, UPSREG_FP), xp_getreg(xp, UPSREG_AP), + xp_getreg(xp, UPSREG_SP), xp_getcfa(xp)); stopres = xp_get_stopres(xp); *************** *** 1120,1123 **** --- 1123,1127 ---- execute_bp_code(bp_at_nextline, fp, xp_getreg(xp, UPSREG_AP), + xp_getreg(xp, UPSREG_SP), xp_getcfa(xp)); stopres = xp_get_stopres(xp); *************** *** 1283,1286 **** --- 1287,1291 ---- xp_getreg(xp, UPSREG_FP), xp_getreg(xp, UPSREG_AP), + xp_getreg(xp, UPSREG_SP), xp_getcfa(xp)); stopres = xp_get_stopres(xp); Index: xc_opcodes.h =================================================================== RCS file: /cvsroot/ups/ups/ups/xc_opcodes.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** xc_opcodes.h 21 Jun 2006 16:25:28 -0000 1.4 --- xc_opcodes.h 14 Jan 2014 14:34:12 -0000 1.5 *************** *** 194,197 **** --- 194,202 ---- x(OC_PROC_PUSH_AP_ADDR_Q, STACKW_SIZE, OS_QUAD), /* ----------------------- */ + x(OC_PROC_PUSH_SP_ADDR_B, STACKW_SIZE, OS_BYTE), + x(OC_PROC_PUSH_SP_ADDR_W, STACKW_SIZE, OS_WORD), + x(OC_PROC_PUSH_SP_ADDR_L, STACKW_SIZE, OS_LONG), + x(OC_PROC_PUSH_SP_ADDR_Q, STACKW_SIZE, OS_QUAD), + /* ----------------------- */ x(OC_PROC_PUSH_CFA_ADDR_B, STACKW_SIZE, OS_BYTE), x(OC_PROC_PUSH_CFA_ADDR_W, STACKW_SIZE, OS_WORD), |
From: Tom H. <th...@us...> - 2014-01-14 12:39:56
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv29985/ups Modified Files: ao_dwfsyms.c ao_dwftype.c ao_dwfutil.c ao_syms.h Log Message: Don't abort if a variable location is too complicated to deal with. Index: ao_dwfsyms.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfsyms.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ao_dwfsyms.c 10 Jan 2014 12:15:52 -0000 1.30 --- ao_dwfsyms.c 14 Jan 2014 12:39:53 -0000 1.31 *************** *** 286,291 **** if (dwf_has_attribute(dbg, addr_die, DW_AT_frame_base) && ! dwf_get_loclist_length(dbg, addr_die, DW_AT_frame_base) == 1) ! fs->fs_frame_base = dwf_get_location(dbg, st->st_apool, addr_die, DW_AT_frame_base, NULL); addr = fs->fs_low_pc; --- 286,293 ---- if (dwf_has_attribute(dbg, addr_die, DW_AT_frame_base) && ! dwf_get_loclist_length(dbg, addr_die, DW_AT_frame_base) == 1) { ! if ((fs->fs_frame_base = dwf_get_location(dbg, st->st_apool, addr_die, DW_AT_frame_base, NULL)) == NULL) ! fs->fs_frame_base = BAD_FRAME_BASE; ! } addr = fs->fs_low_pc; Index: ao_dwftype.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwftype.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ao_dwftype.c 10 Jan 2014 10:51:34 -0000 1.16 --- ao_dwftype.c 14 Jan 2014 12:39:53 -0000 1.17 *************** *** 468,472 **** if (vaddr == NULL) { ! class = class_hint; addr = 0; --- 468,473 ---- if (vaddr == NULL) { ! if ((class = class_hint) != CL_MOU) ! type = NULL; addr = 0; Index: ao_syms.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_syms.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ao_syms.h 7 Jul 2009 15:42:44 -0000 1.9 --- ao_syms.h 14 Jan 2014 12:39:53 -0000 1.10 *************** *** 70,73 **** --- 70,75 ---- } fsyminfo_t; + #define BAD_FRAME_BASE ((vaddr_t *)-1) + #define AO_FSYMDATA(f) ((fsyminfo_t *)(f)->fu_symdata) Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ao_dwfutil.c 13 Jan 2014 10:45:51 -0000 1.23 --- ao_dwfutil.c 14 Jan 2014 12:39:53 -0000 1.24 *************** *** 525,535 **** vaddr = (vaddr_t *)alloc(ap, sizeof(vaddr_t)); ! if (head == NULL) head = vaddr; ! else ! panic("dwf_get_location : location list too long"); ! if (loclist[i]->ld_cents != 1) ! panic("dwf_get_location : location expression too complicated"); op = loclist[i]->ld_s->lr_atom; --- 525,541 ---- vaddr = (vaddr_t *)alloc(ap, sizeof(vaddr_t)); ! if (head == NULL) { head = vaddr; ! } else { ! errf("dwf_get_location : location list too long"); ! head = NULL; ! break; ! } ! if (loclist[i]->ld_cents != 1) { ! errf("dwf_get_location : location expression too complicated"); ! head = NULL; ! break; ! } op = loclist[i]->ld_s->lr_atom; *************** *** 562,566 **** * Relative to frame base address. */ ! if (frame_base && frame_base->v_op == OP_REGISTER) { if (frame_base->v_register == fp_reg) { vaddr->v_op = OP_FP_RELATIVE; --- 568,576 ---- * Relative to frame base address. */ ! if (frame_base == BAD_FRAME_BASE) { ! errf("dwf_get_location : frame base not known"); ! head = NULL; ! i = count; ! } else if (frame_base && frame_base->v_op == OP_REGISTER) { if (frame_base->v_register == fp_reg) { vaddr->v_op = OP_FP_RELATIVE; *************** *** 592,596 **** * Frame base address. */ ! if (frame_base && frame_base->v_op == OP_REGISTER) { if (frame_base->v_register == fp_reg) { vaddr->v_op = OP_FP_RELATIVE; --- 602,610 ---- * Frame base address. */ ! if (frame_base == BAD_FRAME_BASE) { ! errf("dwf_get_location : frame base not known"); ! head = NULL; ! i = count; ! } else if (frame_base && frame_base->v_op == OP_REGISTER) { if (frame_base->v_register == fp_reg) { vaddr->v_op = OP_FP_RELATIVE; |
From: Tom H. <th...@us...> - 2014-01-13 22:42:19
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4150 Modified Files: va_expr.c xc_machine.c Log Message: Fix issues passing struct/union arguments to functions on 64 bit machines. Index: xc_machine.c =================================================================== RCS file: /cvsroot/ups/ups/ups/xc_machine.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** xc_machine.c 22 Nov 2007 10:17:52 -0000 1.7 --- xc_machine.c 13 Jan 2014 22:42:17 -0000 1.8 *************** *** 1524,1528 **** nbytes = GETLONG(pc); addr = *sp; ! sp -= nbytes / 4 - 1; if (IS_CI_ADDR(*sp)) { --- 1524,1528 ---- nbytes = GETLONG(pc); addr = *sp; ! sp -= nbytes / sizeof(stackword_t) - 1; if (IS_CI_ADDR(*sp)) { Index: va_expr.c =================================================================== RCS file: /cvsroot/ups/ups/ups/va_expr.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** va_expr.c 29 Jul 2008 14:26:53 -0000 1.8 --- va_expr.c 13 Jan 2014 22:42:17 -0000 1.9 *************** *** 1227,1231 **** case TY_U_STRUCT: errf("\bCan't display struct/union types"); ! argslots = typesize(Expr_type) /sizeof(int); Expr_type = NULL; break; --- 1227,1231 ---- case TY_U_STRUCT: errf("\bCan't display struct/union types"); ! argslots = typesize(Expr_type) / sizeof(long); Expr_type = NULL; break; |
From: Tom H. <th...@us...> - 2014-01-13 15:02:53
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv32224/ups Modified Files: ao_elfreadbase.c Log Message: Update the offset correct when searching for an ELF note. Index: ao_elfreadbase.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfreadbase.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ao_elfreadbase.c 3 Jan 2014 14:57:57 -0000 1.4 --- ao_elfreadbase.c 13 Jan 2014 15:02:50 -0000 1.5 *************** *** 294,299 **** *p_notesize = nh->n_descsz; } ! ! offset = nextoffset; } } --- 294,299 ---- *p_notesize = nh->n_descsz; } ! ! offset = offset + nextoffset; } } |
From: Tom H. <th...@us...> - 2014-01-13 10:45:53
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14880/ups Modified Files: ao_dwfutil.c Log Message: Handle DW_OP_call_frame_cfa in location expressions. Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ao_dwfutil.c 10 Jan 2014 11:16:55 -0000 1.22 --- ao_dwfutil.c 13 Jan 2014 10:45:51 -0000 1.23 *************** *** 588,591 **** --- 588,609 ---- vaddr->v_op = OP_SP_RELATIVE; vaddr->v_offset = (Dwarf_Signed)loclist[i]->ld_s->lr_number; + } else if (op == DW_OP_call_frame_cfa) { + /* + * Frame base address. + */ + if (frame_base && frame_base->v_op == OP_REGISTER) { + if (frame_base->v_register == fp_reg) { + vaddr->v_op = OP_FP_RELATIVE; + vaddr->v_offset = 0; + } else if (frame_base->v_register == sp_reg) { + vaddr->v_op = OP_SP_RELATIVE; + vaddr->v_offset = 0; + } else { + panic("dwf_get_location : frame base register not fp or sp"); + } + } else { + vaddr->v_op = OP_CFA_RELATIVE; + vaddr->v_offset = 0; + } } else { panic("dwf_get_location : unsupported opcode in location expression"); |
From: Tom H. <th...@us...> - 2014-01-13 10:44:56
|
Update of /cvsroot/ups/ups/lib/libukcprog In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14782/lib/libukcprog Modified Files: errf.c Log Message: Output the newline to the alternate output stream separately, as there may not be space in the buffer to append one there. Index: errf.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libukcprog/errf.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** errf.c 26 Oct 2002 13:02:09 -0000 1.1.1.1 --- errf.c 13 Jan 2014 10:44:53 -0000 1.2 *************** *** 239,244 **** if (User_errf_ofunc1 != NULL) { - strcat(s, "\n"); (*User_errf_ofunc1)((*s == '\b') ? s + 1 : s); } --- 239,244 ---- if (User_errf_ofunc1 != NULL) { (*User_errf_ofunc1)((*s == '\b') ? s + 1 : s); + (*User_errf_ofunc1)("\n"); } |
From: Tom H. <th...@us...> - 2014-01-10 16:37:19
|
Update of /cvsroot/ups/ups/lib/libdwarf In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17328 Added Files: libdwarf.h.in Log Message: Add missing libdwarf.h.in --- NEW FILE: libdwarf.h.in --- /* Copyright (C) 2000-2010 Silicon Graphics, Inc. All Rights Reserved. Portions Copyright 2007-2010 Sun Microsystems, Inc. All rights reserved. Portions Copyright 2008-2013 David Anderson. All rights reserved. Portions Copyright 2008-2010 Arxan Technologies, Inc. All rights reserved. Portions Copyright 2010-2012 SN Systems Ltd. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation. This program is distributed in the hope that it would be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, this software is distributed without any warranty that it is free of the rightful claim of any third person regarding infringement or the like. Any license provided herein, whether implied or [...2971 lines suppressed...] of a flag in libdwarf based on something the application wants. check_verbose_mode of TRUE means do more checking and sometimes print errors (from libdwarf). Not restricted to a single Dwarf_Debug, it applies to the libdwarf the executable is using. */ typedef struct { Dwarf_Bool check_verbose_mode; } Dwarf_Cmdline_Options; extern Dwarf_Cmdline_Options dwarf_cmdline_options; /* Set libdwarf to reflect some application command line options. */ void dwarf_record_cmdline_options(Dwarf_Cmdline_Options /*options*/); #ifdef __cplusplus } #endif #endif /* _LIBDWARF_H */ |
From: Tom H. <th...@us...> - 2014-01-10 16:26:57
|
Update of /cvsroot/ups/ups/lib/libdwarf In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16600/lib/libdwarf Removed Files: libdwarf.h Log Message: Remove generated file. --- libdwarf.h DELETED --- |
From: Tom H. <th...@us...> - 2014-01-10 12:15:54
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30306 Modified Files: ao_dwfsyms.c Log Message: Handle DW_TAG_partial_unit and DW_TAG_imported_unit. Index: ao_dwfsyms.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfsyms.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ao_dwfsyms.c 10 Jan 2014 10:51:34 -0000 1.29 --- ao_dwfsyms.c 10 Jan 2014 12:15:52 -0000 1.30 *************** *** 523,526 **** --- 523,528 ---- die = dwf_child_die(dbg, parent_die); while (die != (Dwarf_Die)0) { + block_t *descend_bl = parent_bl; + Dwarf_Die imported_die; if (dwf_next_stop_check != (time_t)-1 && *************** *** 548,551 **** --- 550,560 ---- break; + case DW_TAG_imported_unit: + imported_die = dwf_die_at_attribute(dbg, die, DW_AT_import); + dwf_load_from_die(st, stf, p_flist, f, p_blocklist, parent_bl, + parent_dt, imported_die, dw_what, dw_level, + recursed + 1); + break; + case DW_TAG_subprogram: if ((dw_level == 1) && (dw_what & DWL_TOP_FUNCS)) { *************** *** 592,597 **** bl_head = bl; - parent_bl = bl_head; descend = TRUE; } else if (dw_what & DWL_ANY_TYPES) { /* --- 601,606 ---- bl_head = bl; descend = TRUE; + descend_bl = bl_head; } else if (dw_what & DWL_ANY_TYPES) { /* *************** *** 948,952 **** if (descend) dwf_load_from_die(st, stf, p_flist, f, ! &(parent_bl->bl_blocks), parent_bl, dt, die, dw_what_next, dw_level+1, recursed+1); --- 957,961 ---- if (descend) dwf_load_from_die(st, stf, p_flist, f, ! &(descend_bl->bl_blocks), descend_bl, dt, die, dw_what_next, dw_level+1, recursed+1); *************** *** 1316,1367 **** */ cu_die = dwf_cu_die(dbg); ! tag = dwf_get_tag(dbg, cu_die); /* Should get DW_TAG_compile_unit */ ! cu_die_offset = dwf_offset_of_die (dbg, cu_die); ! /* ! * Get CU attributes. ! */ ! if (dwf_has_attribute(dbg, cu_die, DW_AT_name)) ! cu_name = dwf_get_string(dbg, ap, cu_die, DW_AT_name); ! else ! cu_name = ""; ! comp_dir = dwf_get_string(dbg, ap, cu_die, DW_AT_comp_dir); ! lang = dwf_get_src_language(dbg, cu_die); ! ct = dwf_get_compiler_type(dbg, cu_die); ! /* ! * Start a new 'stf'. ! */ ! stf = make_stf(ap, cu_name, st, 0, lang, ast->st_dw_debug_base_address); ! stf->stf_symlim = -1; ! stf->stf_fnum = -1; ! stf->stf_dw_dbg = dbg; ! stf->stf_cu_die_offset = (off_t)cu_die_offset; ! stf->stf_cu_hdr_offset = (off_t)cu_hdr_offset; ! stf->stf_compiler_type = ct; ! stf->stf_objpath_hint = comp_dir; ! st->st_sfiles = ao_make_fil(stf, rootblock, comp_dir, st->st_sfiles); ! if ((*cu_name != '\0') && (ast->st_type_names == NULL)) ! ast->st_type_names = hash_create_tab(ap, 1000); ! stf->stf_fil = st->st_sfiles; ! /* ! * Compiler ? ! */ ! if (ct != CT_UNKNOWN) ! st->st_sfiles->fi_flags |= FI_FOUND_COMPILER; ! /* ! * Get the list of files in this CU ! */ ! dwf_get_cu_files(dbg, cu_die, ap, stf); ! if (only_globals) ! dwf_load_globals_from_cu(st, stf, &flist, cu_die, cu_hdr_offset, global_count, globals); ! else ! dwf_load_syms_from_cu(st, stf, &flist, cu_die); ! /* Finish the stf. */ ! reverse_stf_funclist(stf); cu_hdr_offset = (Dwarf_Off)next_cu_hdr; --- 1325,1381 ---- */ cu_die = dwf_cu_die(dbg); ! tag = dwf_get_tag(dbg, cu_die); ! if (tag == DW_TAG_compile_unit) { ! cu_die_offset = dwf_offset_of_die (dbg, cu_die); ! /* ! * Get CU attributes. ! */ ! if (dwf_has_attribute(dbg, cu_die, DW_AT_name)) ! cu_name = dwf_get_string(dbg, ap, cu_die, DW_AT_name); ! else ! cu_name = ""; ! comp_dir = dwf_get_string(dbg, ap, cu_die, DW_AT_comp_dir); ! lang = dwf_get_src_language(dbg, cu_die); ! ct = dwf_get_compiler_type(dbg, cu_die); ! /* ! * Start a new 'stf'. ! */ ! stf = make_stf(ap, cu_name, st, 0, lang, ast->st_dw_debug_base_address); ! stf->stf_symlim = -1; ! stf->stf_fnum = -1; ! stf->stf_dw_dbg = dbg; ! stf->stf_cu_die_offset = (off_t)cu_die_offset; ! stf->stf_cu_hdr_offset = (off_t)cu_hdr_offset; ! stf->stf_compiler_type = ct; ! stf->stf_objpath_hint = comp_dir; ! st->st_sfiles = ao_make_fil(stf, rootblock, comp_dir, st->st_sfiles); ! if ((*cu_name != '\0') && (ast->st_type_names == NULL)) ! ast->st_type_names = hash_create_tab(ap, 1000); ! stf->stf_fil = st->st_sfiles; ! /* ! * Compiler ? ! */ ! if (ct != CT_UNKNOWN) ! st->st_sfiles->fi_flags |= FI_FOUND_COMPILER; ! /* ! * Get the list of files in this CU ! */ ! dwf_get_cu_files(dbg, cu_die, ap, stf); ! if (only_globals) ! dwf_load_globals_from_cu(st, stf, &flist, cu_die, cu_hdr_offset, global_count, globals); ! else ! dwf_load_syms_from_cu(st, stf, &flist, cu_die); ! ! /* Finish the stf. */ ! reverse_stf_funclist(stf); ! } else if (tag != DW_TAG_partial_unit) { ! panic("dwf_scan_symtab : unexpected DIE type"); ! } cu_hdr_offset = (Dwarf_Off)next_cu_hdr; |
From: Tom H. <th...@us...> - 2014-01-10 11:16:58
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26587 Modified Files: ao_dwfutil.c Log Message: Don't crash when we can't find DW_AT_producer for a compile unit. Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ao_dwfutil.c 14 Oct 2010 12:03:36 -0000 1.21 --- ao_dwfutil.c 10 Jan 2014 11:16:55 -0000 1.22 *************** *** 175,196 **** Dwarf_Die cu_die; { ! Compiler_type ct; char *producer; ! producer = dwf_get_string(dbg, NULL, cu_die, DW_AT_producer); - /* - * dwarfTODO: find out other values of 'producer' - * dwarfTODO: if used C++ on a C file may want to change language - */ - if (strncmp (producer, "GNU C ", 6) == 0) - ct = CT_GNU_CC; - else if (strncmp (producer, "GNU C++ ", 8) == 0) - ct = CT_GNU_CC; - else if (strncmp (producer, "GNU F77 ", 8) == 0) - ct = CT_GNU_CC; - else - ct = CT_UNKNOWN; - free (producer); return ct; } --- 175,196 ---- Dwarf_Die cu_die; { ! Compiler_type ct = CT_UNKNOWN; char *producer; ! if ((producer = dwf_get_string(dbg, NULL, cu_die, DW_AT_producer)) != NULL) { ! /* ! * dwarfTODO: find out other values of 'producer' ! * dwarfTODO: if used C++ on a C file may want to change language ! */ ! if (strncmp (producer, "GNU C ", 6) == 0) ! ct = CT_GNU_CC; ! else if (strncmp (producer, "GNU C++ ", 8) == 0) ! ct = CT_GNU_CC; ! else if (strncmp (producer, "GNU F77 ", 8) == 0) ! ct = CT_GNU_CC; ! ! free (producer); ! } return ct; } |
From: Tom H. <th...@us...> - 2014-01-10 10:51:37
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24226 Modified Files: ao_dwarf.c ao_dwarf.h ao_dwfsyms.c ao_dwftype.c Log Message: The dwarf_highpc routine in libdwarf doesn't support the case where the DW_AT_highpc value is an offset from the lowpc value, so implement full support for DW_AT_highpc ourselves. Index: ao_dwarf.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwarf.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ao_dwarf.h 14 Feb 2007 14:59:46 -0000 1.3 --- ao_dwarf.h 10 Jan 2014 10:51:34 -0000 1.4 *************** *** 65,69 **** bool dwf_get_name(Dwarf_Debug dbg, alloc_pool_t *ap, Dwarf_Die die, char **p_name, char **p_mangled); ! Dwarf_Addr dwf_get_address(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half id); Dwarf_Off dwf_get_offset(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half id); Dwarf_Off dwf_get_cu_ref(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half id); --- 65,69 ---- bool dwf_get_name(Dwarf_Debug dbg, alloc_pool_t *ap, Dwarf_Die die, char **p_name, char **p_mangled); ! Dwarf_Addr dwf_get_address(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half id, Dwarf_Addr base); Dwarf_Off dwf_get_offset(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half id); Dwarf_Off dwf_get_cu_ref(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half id); Index: ao_dwarf.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwarf.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ao_dwarf.c 22 Feb 2012 12:32:46 -0000 1.5 --- ao_dwarf.c 10 Jan 2014 10:51:34 -0000 1.6 *************** *** 332,336 **** */ Dwarf_Addr ! dwf_get_address(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half id) { int rv; --- 332,336 ---- */ Dwarf_Addr ! dwf_get_address(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half id, Dwarf_Addr base) { int rv; *************** *** 341,349 **** if ((rv = dwarf_lowpc(die, &addr, &err)) != DW_DLV_OK) dwf_fatal_error("dwarf_lowpc", rv, die, err); - } else if (id == DW_AT_high_pc) { - if ((rv = dwarf_highpc(die, &addr, &err)) != DW_DLV_OK) - dwf_fatal_error("dwarf_highpc", rv, die, err); } else { - Dwarf_Attribute attribute; Dwarf_Half form; --- 341,345 ---- *************** *** 357,360 **** --- 353,367 ---- if ((rv = dwarf_formaddr(attribute, &addr, &err)) != DW_DLV_OK) dwf_fatal_error("dwarf_formaddr", rv, die, err); + } else if ((form == DW_FORM_data1) + || (form == DW_FORM_data2) + || (form == DW_FORM_data4) + || (form == DW_FORM_data8) + || (form == DW_FORM_udata)) { + Dwarf_Unsigned offset; + + if ((rv = dwarf_formudata(attribute, &offset, &err)) != DW_DLV_OK) + dwf_fatal_error("dwarf_formudata", rv, die, err); + + addr = base + offset; } else { dwf_fatal_error("attribute form not address", 0, die, err); Index: ao_dwftype.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwftype.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ao_dwftype.c 29 Jul 2008 14:22:47 -0000 1.15 --- ao_dwftype.c 10 Jan 2014 10:51:34 -0000 1.16 *************** *** 202,207 **** high_pc = 0; } else { ! low_pc = dwf_get_address(dbg, die, DW_AT_low_pc) + stf->stf_addr; ! high_pc = dwf_get_address(dbg, die, DW_AT_high_pc) + stf->stf_addr; } --- 202,207 ---- high_pc = 0; } else { ! low_pc = dwf_get_address(dbg, die, DW_AT_low_pc, 0) + stf->stf_addr; ! high_pc = dwf_get_address(dbg, die, DW_AT_high_pc, low_pc) + stf->stf_addr; } Index: ao_dwfsyms.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfsyms.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ao_dwfsyms.c 7 Jul 2009 15:42:44 -0000 1.28 --- ao_dwfsyms.c 10 Jan 2014 10:51:34 -0000 1.29 *************** *** 281,286 **** fs->fs_initial_lno_fil = fil; /* These used to process line number data later. */ ! fs->fs_low_pc = dwf_get_address(dbg, addr_die, DW_AT_low_pc) + stf->stf_addr; ! fs->fs_high_pc = dwf_get_address(dbg, addr_die, DW_AT_high_pc) + stf->stf_addr; fs->fs_die_offset = dwf_offset_of_die(dbg, addr_die); --- 281,286 ---- fs->fs_initial_lno_fil = fil; /* These used to process line number data later. */ ! fs->fs_low_pc = dwf_get_address(dbg, addr_die, DW_AT_low_pc, 0) + stf->stf_addr; ! fs->fs_high_pc = dwf_get_address(dbg, addr_die, DW_AT_high_pc, fs->fs_low_pc) + stf->stf_addr; fs->fs_die_offset = dwf_offset_of_die(dbg, addr_die); |
From: Tom H. <th...@us...> - 2014-01-09 16:35:52
|
Update of /cvsroot/ups/ups/lib/libdwarf In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8869 Removed Files: dwarf_names.c dwarf_names.h dwarf_names_enum.h dwarf_names_new.h Log Message: Remove generated files. --- dwarf_names_new.h DELETED --- --- dwarf_names_enum.h DELETED --- --- dwarf_names.c DELETED --- --- dwarf_names.h DELETED --- |
From: Tom H. <th...@us...> - 2014-01-09 16:28:36
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8250/ups Modified Files: ao_elfread.c Log Message: Fix handling of build-id's to locate debug files. Index: ao_elfread.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfread.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ao_elfread.c 3 Jan 2014 14:57:57 -0000 1.8 --- ao_elfread.c 9 Jan 2014 16:28:34 -0000 1.9 *************** *** 407,417 **** } ! sprintf(debugpath, "%s/.build-id/%c%c/%s", textdir, idstr[0], idstr[1], idstr + 2); if (access(debugpath, R_OK) < 0) { ! sprintf(debugpath, "%s/.debug/.build-id/%c%c/%s", textdir, idstr[0], idstr[1], idstr + 2); if (access(debugpath, R_OK) < 0) { ! sprintf(debugpath, "/usr/lib/debug/.build-id/%c%c/%s", idstr[0], idstr[1], idstr + 2); if (access(debugpath, R_OK) < 0) { --- 407,417 ---- } ! sprintf(debugpath, "%s/.build-id/%c%c/%s.debug", textdir, idstr[0], idstr[1], idstr + 2); if (access(debugpath, R_OK) < 0) { ! sprintf(debugpath, "%s/.debug/.build-id/%c%c/%s.debug", textdir, idstr[0], idstr[1], idstr + 2); if (access(debugpath, R_OK) < 0) { ! sprintf(debugpath, "/usr/lib/debug/.build-id/%c%c/%s.debug", idstr[0], idstr[1], idstr + 2); if (access(debugpath, R_OK) < 0) { |
From: Tom H. <th...@us...> - 2014-01-03 14:57:59
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27300/ups Modified Files: ao_elfpriv.h ao_elfread.c ao_elfread.h ao_elfread32.c ao_elfread64.c ao_elfreadbase.c Log Message: Add support for looking up debug file by build-id. Index: ao_elfpriv.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfpriv.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ao_elfpriv.h 29 Jul 2005 12:56:59 -0000 1.6 --- ao_elfpriv.h 3 Jan 2014 14:57:57 -0000 1.7 *************** *** 48,51 **** --- 48,55 ---- #endif + #ifndef Elf_Nhdr + typedef struct Elf_Nhdr Elf_Nhdr; + #endif + #ifndef Elf_Sym typedef struct Elf_Sym Elf_Sym; *************** *** 120,123 **** --- 124,130 ---- size_t (*section_entries)PROTO((Elf_Shdr *sh)); + void *(*lookup_note)PROTO((Elfinfo*el, const char *notename, + int notetype, size_t *notesize)); + Elf_Sym *(*lookup_symbol)PROTO((Elf_Sym *syms, size_t index)); const char *(*symbol_name)PROTO((Elf_Sym *sym, const char *strings, Index: ao_elfread.h =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfread.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ao_elfread.h 21 Feb 2005 17:01:22 -0000 1.3 --- ao_elfread.h 3 Jan 2014 14:57:57 -0000 1.4 *************** *** 108,111 **** --- 108,114 ---- (el)->ops->section_entries(sh) + #define elf_lookup_note(el, notename, notetype, p_notesize) \ + (el)->ops->lookup_note(el, notename, notetype, p_notesize) + #define elf_lookup_symbol(el, syms, index) \ (el)->ops->lookup_symbol(syms, index) Index: ao_elfread32.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfread32.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ao_elfread32.c 16 Feb 2004 13:02:00 -0000 1.1 --- ao_elfread32.c 3 Jan 2014 14:57:57 -0000 1.2 *************** *** 30,33 **** --- 30,34 ---- #define Elf_Shdr Elf32_Shdr #define Elf_Phdr Elf32_Phdr + #define Elf_Nhdr Elf32_Nhdr #define Elf_Sym Elf32_Sym #define Elf_Dyn Elf32_Dyn *************** *** 40,43 **** --- 41,46 ---- #define ELF_R_TYPE(val) ELF32_R_TYPE(val) + #define ELF_ALIGN(offset) (((offset) + 3) & ~3) + #define ELF(x) elf32_##x Index: ao_elfread.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfread.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ao_elfread.c 29 Jul 2005 12:56:59 -0000 1.7 --- ao_elfread.c 3 Jan 2014 14:57:57 -0000 1.8 *************** *** 356,361 **** static bool ! find_debug_file(const char *textpath, const char *debugname, ! unsigned long crc, char *debugpath) { char *textdir; --- 356,361 ---- static bool ! find_debug_file_by_name(const char *textpath, const char *debugname, ! unsigned long crc, char *debugpath) { char *textdir; *************** *** 388,391 **** --- 388,430 ---- } + static bool + find_debug_file_by_id(const char *textpath, const unsigned char *id, size_t idsize, char *debugpath) + { + char *idstr = alloca( idsize * 2 +1 ); + char *textdir; + char *textdirptr; + int i; + + for (i = 0; i < idsize; i++ ) + { + sprintf(idstr + i * 2, "%02x", id[i]); + } + + textdir = strsave(textpath); + + if ((textdirptr = strrchr(textdir, '/')) != NULL) { + *textdirptr = '\0'; + } + + sprintf(debugpath, "%s/.build-id/%c%c/%s", textdir, idstr[0], idstr[1], idstr + 2); + + if (access(debugpath, R_OK) < 0) { + sprintf(debugpath, "%s/.debug/.build-id/%c%c/%s", textdir, idstr[0], idstr[1], idstr + 2); + + if (access(debugpath, R_OK) < 0) { + sprintf(debugpath, "/usr/lib/debug/.build-id/%c%c/%s", idstr[0], idstr[1], idstr + 2); + + if (access(debugpath, R_OK) < 0) { + free(textdir); + return FALSE; + } + } + } + + free(textdir); + + return TRUE; + } + static Elfinfo * open_debug_file(const char *debugpath) *************** *** 446,449 **** --- 485,490 ---- Elfinfo *el; const char *symtab_secname; + void *buildid; + size_t buildidsize; #if WANT_DWARF Elf_Shdr *dwarfsh; *************** *** 501,505 **** } ! if (elf_lookup_section(el, ".gnu_debuglink", &debuglinksh)) { char *debuglink = e_malloc(elf_section_size(el, debuglinksh)); --- 542,555 ---- } ! if ((buildid = elf_lookup_note(el, "GNU", NT_GNU_BUILD_ID, &buildidsize)) != NULL) { ! char debugpath[256]; ! ! if (find_debug_file_by_id(textpath, buildid, buildidsize, debugpath)) { ! el->debugel = open_debug_file(debugpath); ! } ! ! free(buildid); ! } ! else if (elf_lookup_section(el, ".gnu_debuglink", &debuglinksh)) { char *debuglink = e_malloc(elf_section_size(el, debuglinksh)); *************** *** 516,521 **** crc = *(unsigned int *)(debuglink + crc_offset); ! if (find_debug_file(textpath, debuglink, crc, debugpath)) { ! el->debugel = open_debug_file(debugpath); } } --- 566,571 ---- crc = *(unsigned int *)(debuglink + crc_offset); ! if (find_debug_file_by_name(textpath, debuglink, crc, debugpath)) { ! el->debugel = open_debug_file(debugpath); } } Index: ao_elfread64.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfread64.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ao_elfread64.c 16 Feb 2004 13:02:00 -0000 1.1 --- ao_elfread64.c 3 Jan 2014 14:57:57 -0000 1.2 *************** *** 30,33 **** --- 30,34 ---- #define Elf_Shdr Elf64_Shdr #define Elf_Phdr Elf64_Phdr + #define Elf_Nhdr Elf64_Nhdr #define Elf_Sym Elf64_Sym #define Elf_Dyn Elf64_Dyn *************** *** 40,43 **** --- 41,46 ---- #define ELF_R_TYPE(val) ELF64_R_TYPE(val) + #define ELF_ALIGN(offset) (((offset) + 3) & ~3) + #define ELF(x) elf64_##x Index: ao_elfreadbase.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_elfreadbase.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ao_elfreadbase.c 21 Feb 2005 17:01:22 -0000 1.3 --- ao_elfreadbase.c 3 Jan 2014 14:57:57 -0000 1.4 *************** *** 268,271 **** --- 268,309 ---- } + static void * + ELF(lookup_note)(Elfinfo *el, const char *notename, int notetype, size_t *p_notesize) + { + void *note = NULL; + Elf_Shdr *sh; + + for (sh = el->sections; note == NULL && sh < el->sections + el->num_sections; sh++) { + if (sh->sh_type == SHT_NOTE) { + unsigned char *data = e_malloc(sh->sh_size); + + if (ELF(read_section)(el, el->sec_strings + sh->sh_name, sh, data)) { + int offset = 0; + + while (note == NULL && offset < sh->sh_size) { + Elf_Nhdr *nh = (Elf_Nhdr *)(data + offset); + int nameoffset = sizeof(Elf_Nhdr); + char *name = (char *)(data + nameoffset); + int descoffset = ELF_ALIGN(nameoffset + nh->n_namesz); + unsigned char *desc = (unsigned char *)(data + descoffset); + int nextoffset = ELF_ALIGN(descoffset + nh->n_descsz); + + if (strcmp(name, notename) == 0 && nh->n_type == notetype) { + note = e_malloc(nh->n_descsz); + memcpy(note, desc, nh->n_descsz); + *p_notesize = nh->n_descsz; + } + + offset = nextoffset; + } + } + + free(data); + } + } + + return note; + } + static Elf_Sym * ELF(lookup_symbol)(Elf_Sym *syms, size_t index) *************** *** 472,475 **** --- 510,514 ---- ELF(section_link), ELF(section_entries), + ELF(lookup_note), ELF(lookup_symbol), ELF(symbol_name), |
From: Tom H. <th...@us...> - 2012-03-16 14:57:52
|
Update of /cvsroot/ups/ups/ups In directory vz-cvs-3.sog:/tmp/cvs-serv24329 Modified Files: ci_compile_expr.c Log Message: Call ci_typesize to get the size of the type are dereferencing when compiling OP_DEREF as peeking directly into the type structure may not work if the size hasn't been filled in yet. Index: ci_compile_expr.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ci_compile_expr.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ci_compile_expr.c 22 Jun 2006 09:03:51 -0000 1.7 --- ci_compile_expr.c 16 Mar 2012 14:57:49 -0000 1.8 *************** *** 1409,1413 **** if (context == EC_VALUE && !is_aggregate(base) && base->ty_code != DT_FUNC_RETURNING) { ! code_deref(tx, base->ty_code, base->ty_size, expr_addrtype); addrtype = unknown_addrtype(tx); } --- 1409,1414 ---- if (context == EC_VALUE && !is_aggregate(base) && base->ty_code != DT_FUNC_RETURNING) { ! size = ci_typesize(NULL, base); ! code_deref(tx, base->ty_code, size, expr_addrtype); addrtype = unknown_addrtype(tx); } |
Update of /cvsroot/ups/ups/lib/libdwarf In directory vz-cvs-3.sog:/tmp/cvs-serv32689/lib/libdwarf Modified Files: COPYING ChangeLog NEWS README dwarf.h dwarf.v2.mm dwarf_error.c dwarf_frame.c dwarf_line.c dwarf_line.h dwarf_loc.c dwarf_macro.h dwarf_names.c dwarf_names.h dwarf_names_enum.h dwarf_names_new.h dwarf_print_lines.c libdwarf.h libdwarf2.1.mm libdwarf2.1.pdf libdwarf2p.1.mm libdwarf2p.1.pdf pro_incl.h pro_init.c pro_line.c pro_line.h pro_opaque.h pro_section.c Log Message: Update libdwarf to 20111214 version. Index: libdwarf.h =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/libdwarf.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** libdwarf.h 11 Nov 2011 10:27:24 -0000 1.9 --- libdwarf.h 22 Feb 2012 13:55:02 -0000 1.10 *************** *** 1061,1064 **** --- 1061,1065 ---- #define DW_DLE_DEBUG_TYPES_ONLY_DWARF4 238 #define DW_DLE_DEBUG_TYPEOFFSET_BAD 239 + #define DW_DLE_GNU_OPCODE_ERROR 240 *************** *** 1517,1523 **** --- 1518,1531 ---- Dwarf_Error* /*error*/); + /* dwarf_lineoff() is OBSOLETE as of December 2011. Do not use. */ int dwarf_lineoff(Dwarf_Line /*line*/, Dwarf_Signed * /*returned_lineoffset*/, Dwarf_Error* /*error*/); + /* dwarf_lineoff_b() correctly returns an unsigned column number + through the pointer returned_offset. + dwarf_lineoff_b() is new in December 2011. */ + int dwarf_lineoff_b(Dwarf_Line /*line*/, + Dwarf_Unsigned */*returned_lineoffset*/, + Dwarf_Error* /*error*/); int dwarf_linesrc(Dwarf_Line /*line*/, *************** *** 1529,1532 **** --- 1537,1549 ---- Dwarf_Error* /*error*/); + /* We gather these into one call as it's likely one + will want all or none of them. */ + int dwarf_prologue_end_etc(Dwarf_Line /* line */, + Dwarf_Bool * /*prologue_end*/, + Dwarf_Bool * /*eplogue_begin*/, + Dwarf_Unsigned * /* isa */, + Dwarf_Unsigned * /* discriminator */, + Dwarf_Error * /*error*/); + /* Tertiary interface to line info */ /* Unimplemented */ *************** *** 2396,2399 **** --- 2413,2428 ---- Dwarf_Error* /*error*/); + Dwarf_Unsigned dwarf_add_line_entry_b(Dwarf_P_Debug /*dbg*/, + Dwarf_Unsigned /*file_index*/, + Dwarf_Addr /*code_address*/, + Dwarf_Unsigned /*lineno*/, + Dwarf_Signed /*column_number*/, + Dwarf_Bool /*is_source_stmt_begin*/, + Dwarf_Bool /*is_basic_block_begin*/, + Dwarf_Bool /*is_epilogue_begin*/, + Dwarf_Bool /*is_prologue_end*/, + Dwarf_Unsigned /*isa*/, + Dwarf_Unsigned /*discriminator*/, + Dwarf_Error* /*error*/); Dwarf_Unsigned dwarf_add_line_entry(Dwarf_P_Debug /*dbg*/, Dwarf_Unsigned /*file_index*/, Index: libdwarf2.1.pdf =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/libdwarf2.1.pdf,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvspaAsiT and /tmp/cvsADE5cC differ Index: dwarf.v2.mm =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dwarf.v2.mm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dwarf.v2.mm 11 Nov 2011 10:27:24 -0000 1.7 --- dwarf.v2.mm 22 Feb 2012 13:55:02 -0000 1.8 *************** *** 50,55 **** '\" '\" $Log$ ! '\" Revision 1.7 2011/11/11 10:27:24 thughes ! '\" Update libdwarf to 20111030 version. '\" '\" Revision 1.1 1994/05/18 18:50:42 davea --- 50,55 ---- '\" '\" $Log$ ! '\" Revision 1.8 2012/02/22 13:55:02 thughes ! '\" Update libdwarf to 20111214 version. '\" '\" Revision 1.1 1994/05/18 18:50:42 davea Index: dwarf_error.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dwarf_error.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dwarf_error.c 11 Nov 2011 10:27:24 -0000 1.9 --- dwarf_error.c 22 Feb 2012 13:55:02 -0000 1.10 *************** *** 327,330 **** --- 327,331 ---- "DW_DLE_DEBUG_TYPES_ONLY_DWARF4 (238)", "DW_DLE_DEBUG_TYPEOFFSET_BAD (239)", + "DW_DLE_GNU_OPCODE_ERROR (240)", }; Index: libdwarf2p.1.pdf =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/libdwarf2p.1.pdf,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvs3WZdLe and /tmp/cvs8UrvIY differ Index: dwarf_print_lines.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dwarf_print_lines.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dwarf_print_lines.c 11 Nov 2011 10:27:24 -0000 1.9 --- dwarf_print_lines.c 22 Feb 2012 13:55:02 -0000 1.10 *************** *** 54,62 **** { printf ! (" s b e\n" ! " t l s\n" ! " m c e\n" ! " section op col t k q\n" ! " offset code address file line umn ? ? ?\n"); } --- 54,62 ---- { printf ! (" s b e p e i d\n" ! " t l s r p s i\n" ! " m c e o i a s\n" ! " section op col t k q l l c\n" ! " offset code address file line umn ? ? ? ? ? \n"); } *************** *** 70,77 **** unsigned long column, int is_stmt, int basic_block, int end_sequence, ! int prologue_end, int epilogue_begin, int isa) { printf("%-15s %2d 0x%" DW_PR_XZEROS DW_PR_DUx " " ! "%2lu %4lu %2lu %1d %1d %1d\n", prefix, (int) opcode, --- 70,78 ---- unsigned long column, int is_stmt, int basic_block, int end_sequence, ! int prologue_end, int epilogue_begin, int isa, ! Dwarf_Unsigned discriminator) { printf("%-15s %2d 0x%" DW_PR_XZEROS DW_PR_DUx " " ! "%2lu %4lu %2lu %1d %1d %1d", prefix, (int) opcode, *************** *** 81,85 **** (unsigned long) column, (int) is_stmt, (int) basic_block, (int) end_sequence); ! } --- 82,92 ---- (unsigned long) column, (int) is_stmt, (int) basic_block, (int) end_sequence); ! if(discriminator || prologue_end || epilogue_begin || isa) { ! printf(" %1d", prologue_end); ! printf(" %1d", epilogue_begin); ! printf(" %1d", isa); ! printf(" 0x%" DW_PR_DUx , discriminator); ! } ! printf("\n"); } *************** *** 129,132 **** --- 136,141 ---- Dwarf_Bool epilogue_begin = false; Dwarf_Small isa = 0; + Dwarf_Unsigned op_index = 0; + Dwarf_Unsigned discriminator = 0; *************** *** 380,388 **** special_opcode_base and MAX_LINE_OP_CODE) */ char special[50]; unsigned origop = opcode; opcode = opcode - prefix.pf_opcode_base; ! address = address + prefix.pf_minimum_instruction_length * ! (opcode / prefix.pf_line_range); line = line + prefix.pf_line_base + opcode % prefix.pf_line_range; --- 389,407 ---- special_opcode_base and MAX_LINE_OP_CODE) */ char special[50]; + Dwarf_Unsigned operation_advance = 0; unsigned origop = opcode; opcode = opcode - prefix.pf_opcode_base; ! operation_advance = (opcode / prefix.pf_line_range); ! if(prefix.pf_maximum_ops_per_instruction < 2) { ! address = address + (prefix.pf_minimum_instruction_length * ! operation_advance); ! } else { ! address = address + (prefix.pf_minimum_instruction_length * ! ((op_index + operation_advance)/ ! prefix.pf_maximum_ops_per_instruction)); ! op_index = (op_index +operation_advance)% ! prefix.pf_maximum_ops_per_instruction; ! } line = line + prefix.pf_line_base + opcode % prefix.pf_line_range; *************** *** 391,396 **** opcode, address, (int) file, line, column, is_stmt, basic_block, end_sequence, ! prologue_end, epilogue_begin, isa); basic_block = false; } else if (type == LOP_STANDARD) { switch (opcode) { --- 410,418 ---- opcode, address, (int) file, line, column, is_stmt, basic_block, end_sequence, ! prologue_end, epilogue_begin, isa,discriminator); basic_block = false; + prologue_end = false; + epilogue_begin = false; + discriminator = 0; } else if (type == LOP_STANDARD) { switch (opcode) { *************** *** 401,406 **** column, is_stmt, basic_block, end_sequence, prologue_end, ! epilogue_begin, isa); basic_block = false; } break; --- 423,431 ---- column, is_stmt, basic_block, end_sequence, prologue_end, ! epilogue_begin, isa,discriminator); basic_block = false; + prologue_end = false; + epilogue_begin = false; + discriminator = 0; } break; *************** *** 464,470 **** case DW_LNS_const_add_pc:{ opcode = MAX_LINE_OP_CODE - prefix.pf_opcode_base; ! address = address + ! prefix.pf_minimum_instruction_length * (opcode / ! prefix.pf_line_range); printf("DW_LNS_const_add_pc new address 0x%" DW_PR_XZEROS DW_PR_DSx "\n", --- 489,508 ---- case DW_LNS_const_add_pc:{ opcode = MAX_LINE_OP_CODE - prefix.pf_opcode_base; ! if(prefix.pf_maximum_ops_per_instruction < 2) { ! Dwarf_Unsigned operation_advance = ! (opcode / prefix.pf_line_range); ! address = address + ! prefix.pf_minimum_instruction_length * ! operation_advance; ! } else { ! Dwarf_Unsigned operation_advance = ! (opcode / prefix.pf_line_range); ! address = address + prefix.pf_minimum_instruction_length * ! ((op_index + operation_advance)/ ! prefix.pf_maximum_ops_per_instruction); ! op_index = (op_index +operation_advance)% ! prefix.pf_maximum_ops_per_instruction; ! } ! printf("DW_LNS_const_add_pc new address 0x%" DW_PR_XZEROS DW_PR_DSx "\n", *************** *** 483,486 **** --- 521,525 ---- (Dwarf_Signed) fixed_advance_pc, (Dwarf_Signed) address); + op_index = 0; } break; *************** *** 536,540 **** column, is_stmt, basic_block, end_sequence, prologue_end, ! epilogue_begin, isa); address = 0; --- 575,579 ---- column, is_stmt, basic_block, end_sequence, prologue_end, ! epilogue_begin, isa,discriminator); address = 0; *************** *** 547,550 **** --- 586,592 ---- prologue_end = false; epilogue_begin = false; + isa = 0; + discriminator = 0; + op_index = 0; } break; *************** *** 559,562 **** --- 601,605 ---- (Dwarf_Unsigned) address); + op_index = 0; } break; *************** *** 592,595 **** --- 635,649 ---- } break; + case DW_LNE_set_discriminator:{ + /* new in DWARF4 */ + Dwarf_Unsigned utmp2 = 0; + + DECODE_LEB128_UWORD(line_ptr, utmp2); + discriminator = (Dwarf_Word) utmp2; + printf("DW_LNE_set_discriminator 0x%" + DW_PR_XZEROS DW_PR_DUx "\n",utmp2); + } + break; + default:{ /* This is an extended op code we do not know about, Index: ChangeLog =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/ChangeLog,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ChangeLog 11 Nov 2011 10:27:23 -0000 1.8 --- ChangeLog 22 Feb 2012 13:55:02 -0000 1.9 *************** *** 1,2 **** --- 1,59 ---- + 2011-12-14 DavidAnderson <da...@ea...> + * libdwarf.h, dwarf_error.c: Add a new error code + for DW_OP location codes. + * dwarf_loc.c: Implement support for new DW_OP_GNU codes. + 2011-12-13 DavidAnderson <da...@ea...> + * dwarf.h: Added some GNU extensions. + * libdwarf.h: Added dwarf_lineoff_b() as + dwarf_lineoff() wrongly returns a signed column number. + Added dwarf_add_lineentry_b() as preparation for creating + DWARF3/4 output. + * dwarf_line.h: Added new struct fields to accomodate + DWARF3/4 isa and discriminator fields. + * dwarf_line.c: Now deals with the VLIW line calculations + in DWARF4. Adds support for computing the discriminator + and isa fields. Adds dwarf_lineoff_b() (and dwarf_lineoff + is now deprecated). Adds dwarf_prologue_end_etc() which + returns some DWARF3/4 line fields. + * dwarf_print_lines.c: Adds handling of DWARF3/4 + line operations and fields and prints the details. + * libdwarf2.1.mm: Documents the new functions in dwarf_line.c + Version set to 2.02. + * libdwarf2.1.pdf: Regenerated. + * libdwarf2p.1.mm: Documents the new function + dwaf_add_line_entry_b(). + Version set to 1.32. + * libdwarf2p.1.pdf: Regenerated. + * pro_incl.h: Add parentheses so the WRITE_UNALIGNED macro + works correctly in all circumtances. + * pro_opaque.h: Add DEBUG_RANGES and dEBUG_TYPES to the list + of sections we could generate. Define struct Dwarf_P_Line_Inits_s + to hold initialization values for line table data so we can later + make the choices at runtime rather than compile time. + The new struct is a field of the Dwarf_P_Debug struct. + * pro_line.h: Added some DWARF3/4 support and preparations + for emitting DWARF3/4. + * pro_line.c: Define dwarf_add_line_entry_b() for DWARF3/4 + line fields, and _dwarf_init_default_line_header_vals() + to provide a default set of values, the defaults match + what was previously done. + Add support for the new DWARF3/4 line table fields. + * pro_section.c: Add the beginnings of support for creating + new DWARF3/4 sections and the new standard opcodes. + Move the field-writing code to small functions making + the line table writing smaller and easier to read. + Added the beginnings of allowing writing DWARF3/4 + line table fields. Some if() missing {} were + modified by adding {} to avoid future problems. + 2011-12-08 DavidAnderson <da...@ea...> + * dwarf_frame.c: Corrected a typo by adding a space + to a comment. + * libdwarf2p.1.mm: A sentence about dwarf_lne_end_sequence() + was missing its introductory words. New version is 1.31. + * libdwarf2p.1.pdf: Regenerated. + 2011-11-02 DavidAnderson <da...@ea...> + * dwarf.h: Spelling fix: specfic->specific. + Rearranged a few comments about MIPS/SGI for + a better appearance. 2011-10-29 DavidAnderson <da...@ea...> * dwarf_alloc.c: Add support for the .debug_types section. Index: pro_section.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/pro_section.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pro_section.c 11 Nov 2011 10:27:24 -0000 1.6 --- pro_section.c 22 Feb 2012 13:55:03 -0000 1.7 *************** *** 89,93 **** REL_SEC_PREFIX ".debug_weaknames", /* sgi extension */ REL_SEC_PREFIX ".debug_macinfo", ! REL_SEC_PREFIX ".debug_loc" }; --- 89,96 ---- REL_SEC_PREFIX ".debug_weaknames", /* sgi extension */ REL_SEC_PREFIX ".debug_macinfo", ! REL_SEC_PREFIX ".debug_loc", ! REL_SEC_PREFIX ".debug_ranges", [...1162 lines suppressed...] ! if (die->di_child == NULL) curabbrev->abb_children = DW_CHILDREN_no; ! else curabbrev->abb_children = DW_CHILDREN_yes; curabbrev->abb_tag = die->di_tag; curabbrev->abb_attrs = attrs; --- 2225,2237 ---- curabbrev = (Dwarf_P_Abbrev) _dwarf_p_get_alloc(die->di_dbg, sizeof(struct Dwarf_P_Abbrev_s)); ! if (curabbrev == NULL) { return NULL; + } ! if (die->di_child == NULL) { curabbrev->abb_children = DW_CHILDREN_no; ! } else { curabbrev->abb_children = DW_CHILDREN_yes; + } curabbrev->abb_tag = die->di_tag; curabbrev->abb_attrs = attrs; Index: dwarf.h =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dwarf.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dwarf.h 11 Nov 2011 10:27:24 -0000 1.9 --- dwarf.h 22 Feb 2012 13:55:02 -0000 1.10 *************** *** 147,151 **** #define DW_TAG_GNU_EINCL 0x4105 /* GNU */ - /* GNU extension. http://gcc.gnu.org/wiki/TemplateParmsDwarf */ #define DW_TAG_GNU_template_template_parameter 0x4106 /* GNU */ --- 147,150 ---- *************** *** 154,157 **** --- 153,159 ---- #define DW_TAG_GNU_formal_parameter_pack 0x4108 /* GNU */ + #define DW_TAG_GNU_call_site 0x4109 /* GNU */ + #define DW_TAG_GNU_call_site_parameter 0x410a /* GNU */ + /* ALTIUM extensions */ /* DSP-C/Starcore __circ qualifier */ *************** *** 379,383 **** #define DW_AT_body_end 0x2106 /* GNU */ #define DW_AT_GNU_vector 0x2107 /* GNU */ ! #define DW_AT_GNU_template_name 0x2108 /* GNU */ /* ALTIUM extension: ALTIUM Compliant location lists (flag) */ --- 381,416 ---- #define DW_AT_body_end 0x2106 /* GNU */ #define DW_AT_GNU_vector 0x2107 /* GNU */ ! ! /* Thread safety, see http://gcc.gnu.org/wiki/ThreadSafetyAnnotation . */ ! /* The values here are from gcc-4.6.2 include/dwarf2.h. The ! values are not given on the web page at all, nor on web pages ! it refers to. */ ! #define DW_AT_GNU_guarded_by 0x2108 /* GNU */ ! #define DW_AT_GNU_pt_guarded_by 0x2109 /* GNU */ ! #define DW_AT_GNU_guarded 0x210a /* GNU */ ! #define DW_AT_GNU_pt_guarded 0x210b /* GNU */ ! #define DW_AT_GNU_locks_excluded 0x210c /* GNU */ ! #define DW_AT_GNU_exclusive_locks_required 0x210d /* GNU */ ! #define DW_AT_GNU_shared_locks_required 0x210e /* GNU */ ! ! /* See http://gcc.gnu.org/wiki/DwarfSeparateTypeInfo */ ! #define DW_AT_GNU_odr_signature 0x210f /* GNU */ ! ! /* See See http://gcc.gnu.org/wiki/TemplateParmsDwarf */ ! /* The value here is from gcc-4.6.2 include/dwarf2.h. The value is ! not consistent with the web page as of December 2011. */ ! #define DW_AT_GNU_template_name 0x2110 /* GNU */ ! /* The GNU call site extension. ! See http://www.dwarfstd.org/ShowIssue.php?issue=100909.2&type=open . */ ! #define DW_AT_GNU_call_site_value 0x2111 /* GNU */ ! #define DW_AT_GNU_call_site_data_value 0x2112 /* GNU */ ! #define DW_AT_GNU_call_site_target 0x2113 /* GNU */ ! #define DW_AT_GNU_call_site_target_clobbered 0x2114 /* GNU */ ! #define DW_AT_GNU_tail_call 0x2115 /* GNU */ ! #define DW_AT_GNU_all_tail_call_sites 0x2116 /* GNU */ ! #define DW_AT_GNU_all_call_sites 0x2117 /* GNU */ ! #define DW_AT_GNU_all_source_call_sites 0x2118 /* GNU */ ! ! /* ALTIUM extension: ALTIUM Compliant location lists (flag) */ *************** *** 433,436 **** --- 466,473 ---- #define DW_AT_SUN_fortran_based 0x223b /* SUN */ + /* See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type . */ + #define DW_AT_use_GNAT_descriptive_type 0x2301 /* GNAT */ + #define DW_AT_GNAT_descriptive_type 0x2302 /* GNAT */ + /* UPC extension */ #define DW_AT_upc_threads_scaled 0x3210 /* UPC */ *************** *** 622,625 **** --- 659,668 ---- #define DW_OP_lo_user 0xe0 + + #define DW_OP_GNU_uninit 0xf0 /* GNU */ + #define DW_OP_GNU_encoded_addr 0xf1 /* GNU */ + #define DW_OP_GNU_implicit_pointer 0xf2 /* GNU */ + #define DW_OP_GNU_entry_value 0xf3 /* GNU */ + /* HP extensions. */ #define DW_OP_HP_unknown 0xe0 /* HP conflict: GNU */ *************** *** 633,639 **** #define DW_OP_INTEL_bit_piece 0xe8 /* Intel: made obsolete by DW_OP_bit_piece above. */ - /* Apple extension. */ #define DW_OP_APPLE_uninit 0xf0 /* Apple */ #define DW_OP_hi_user 0xff --- 676,682 ---- #define DW_OP_INTEL_bit_piece 0xe8 /* Intel: made obsolete by DW_OP_bit_piece above. */ /* Apple extension. */ #define DW_OP_APPLE_uninit 0xf0 /* Apple */ + #define DW_OP_PGI_omp_thread_num 0xf8 /* PGI (STMicroelectronics) */ #define DW_OP_hi_user 0xff *************** *** 778,781 **** --- 821,829 ---- #define DW_CC_lo_user 0x40 + #define DW_CC_GNU_renesas_sh 0x40 /* GNU */ + #define DW_CC_GNU_borland_fastcall_i386 0x41 /* GNU */ + + + /* ALTIUM extensions. */ /* Function is an interrupt handler, return address on system stack. */ *************** *** 840,843 **** --- 888,892 ---- #define DW_LNE_HP_define_proc 0x20 /* 32 HP */ + #define DW_LNE_HP_source_file_correlation 0x80 /* HP */ #define DW_LNE_lo_user 0x80 /* DWARF3 */ #define DW_LNE_hi_user 0xff /* DWARF3 */ *************** *** 926,943 **** ! /* Mapping from machine registers and pseudo-regs into the .debug_frame table. ! DW_FRAME entries are machine specific. These describe ! MIPS/SGI R3000, R4K, R4400 and all later MIPS/SGI IRIX machines. ! They describe a mapping from hardware register number to ! the number used in the table to identify that register. ! The CFA (Canonical Frame Address) described in DWARF is called ! the Virtual Frame Pointer on MIPS/SGI machines. ! The DW_FRAME* names here are MIPS/SGI specfic. Libdwarf interfaces defined in 2008 make the ! frame definitions ! here (and the fixed table sizes they imply) obsolete. ! They are left here for compatibility. */ /* Default column used for CFA in the libdwarf reader client. --- 975,992 ---- ! /* Mapping from machine registers and pseudo-regs into the ! .debug_frame table. DW_FRAME entries are machine specific. ! These describe MIPS/SGI R3000, R4K, R4400 and all later ! MIPS/SGI IRIX machines. They describe a mapping from ! hardware register number to the number used in the table ! to identify that register. ! The CFA (Canonical Frame Address) described in DWARF is ! called the Virtual Frame Pointer on MIPS/SGI machines. ! The DW_FRAME* names here are MIPS/SGI specific. Libdwarf interfaces defined in 2008 make the ! frame definitions here (and the fixed table sizes ! they imply) obsolete. They are left here for compatibility. */ /* Default column used for CFA in the libdwarf reader client. Index: pro_init.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/pro_init.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pro_init.c 11 Nov 2011 10:27:24 -0000 1.7 --- pro_init.c 22 Feb 2012 13:55:03 -0000 1.8 *************** *** 164,167 **** --- 164,168 ---- dbg->de_current_active_section = &init_sect; dbg->de_flags = flags; + _dwarf_init_default_line_header_vals(dbg); /* Now, with flags set, can use 64bit tests */ Index: pro_opaque.h =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/pro_opaque.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pro_opaque.h 11 Nov 2011 10:27:24 -0000 1.6 --- pro_opaque.h 22 Feb 2012 13:55:03 -0000 1.7 *************** *** 143,149 **** #define DEBUG_MACINFO 11 #define DEBUG_LOC 12 ! /* number of debug_* sections not including the relocations */ ! #define NUM_DEBUG_SECTIONS DEBUG_LOC + 1 --- 143,174 ---- #define DEBUG_MACINFO 11 #define DEBUG_LOC 12 + #define DEBUG_RANGES 13 + #define DEBUG_TYPES 14 ! /* Maximum number of debug_* sections not including the relocations */ ! #define NUM_DEBUG_SECTIONS 15 ! ! /* Describes the data needed to generate line table header info ! so we can vary the init at runtime. */ ! struct Dwarf_P_Line_Inits_s { ! unsigned pi_version; /* line table version number */ ! unsigned pi_default_is_stmt; /* default value for is_stmt */ ! ! /* Size of the smallest instruction, in bytes. */ ! unsigned pi_minimum_instruction_length; ! ! /* Make this >1 for VLIW machines. */ ! unsigned pi_maximum_operations_per_instruction; ! ! /* Normally opcode_base is determined by pi_version, but we ! allow manual setting here so we can generate data like ! GNU with a DWARF3 opcode base in a DWARF2 section. ! This determines how much of the header_opcode_lengths ! table is emitted in the line table header */ ! unsigned pi_opcode_base; ! ! int pi_line_base; /* For line table header. */ ! int pi_line_range; /* For line table header. */ ! }; *************** *** 475,478 **** --- 500,505 ---- /* String attributes data of each section. */ struct Dwarf_P_Per_Sect_String_Attrs_s de_sect_string_attr[NUM_DEBUG_SECTIONS]; + /* Hold data needed to init new line output flexibly. */ + struct Dwarf_P_Line_Inits_s de_line_inits; }; Index: dwarf_names_enum.h =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dwarf_names_enum.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dwarf_names_enum.h 11 Nov 2011 10:27:24 -0000 1.1 --- dwarf_names_enum.h 22 Feb 2012 13:55:02 -0000 1.2 *************** *** 1,4 **** /* Automatically generated, do not edit. */ ! /* Generated on Nov 11 2011 10:24:05 */ /* BEGIN FILE */ --- 1,4 ---- /* Automatically generated, do not edit. */ ! /* Generated on Feb 22 2012 12:46:56 */ /* BEGIN FILE */ *************** *** 80,83 **** --- 80,85 ---- DW_TAG_GNU_template_parameter_pack = 0x4107, DW_TAG_GNU_formal_parameter_pack = 0x4108, + DW_TAG_GNU_call_site = 0x4109, + DW_TAG_GNU_call_site_parameter = 0x410a, DW_TAG_SUN_function_template = 0x4201, DW_TAG_SUN_class_template = 0x4202, *************** *** 271,275 **** DW_AT_body_end = 0x2106, DW_AT_GNU_vector = 0x2107, ! DW_AT_GNU_template_name = 0x2108, DW_AT_SUN_template = 0x2201, DW_AT_SUN_alignment = 0x2202, --- 273,293 ---- DW_AT_body_end = 0x2106, DW_AT_GNU_vector = 0x2107, ! DW_AT_GNU_guarded_by = 0x2108, ! DW_AT_GNU_pt_guarded_by = 0x2109, ! DW_AT_GNU_guarded = 0x210a, ! DW_AT_GNU_pt_guarded = 0x210b, ! DW_AT_GNU_locks_excluded = 0x210c, ! DW_AT_GNU_exclusive_locks_required = 0x210d, ! DW_AT_GNU_shared_locks_required = 0x210e, ! DW_AT_GNU_odr_signature = 0x210f, ! DW_AT_GNU_template_name = 0x2110, ! DW_AT_GNU_call_site_value = 0x2111, ! DW_AT_GNU_call_site_data_value = 0x2112, ! DW_AT_GNU_call_site_target = 0x2113, ! DW_AT_GNU_call_site_target_clobbered = 0x2114, ! DW_AT_GNU_tail_call = 0x2115, ! DW_AT_GNU_all_tail_call_sites = 0x2116, ! DW_AT_GNU_all_call_sites = 0x2117, ! DW_AT_GNU_all_source_call_sites = 0x2118, DW_AT_SUN_template = 0x2201, DW_AT_SUN_alignment = 0x2202, *************** *** 319,322 **** --- 337,342 ---- DW_AT_SUN_fortran_based = 0x223b, DW_AT_ALTIUM_loclist = 0x2300, + DW_AT_use_GNAT_descriptive_type = 0x2301, + DW_AT_GNAT_descriptive_type = 0x2302, DW_AT_upc_threads_scaled = 0x3210, DW_AT_PGI_lbase = 0x3a00, *************** *** 496,500 **** DW_OP_HP_tls = 0x00e6, DW_OP_INTEL_bit_piece = 0x00e8, ! DW_OP_APPLE_uninit = 0x00f0, DW_OP_hi_user = 0x00ff }; --- 516,524 ---- DW_OP_HP_tls = 0x00e6, DW_OP_INTEL_bit_piece = 0x00e8, ! DW_OP_GNU_uninit = 0x00f0, ! DW_OP_GNU_encoded_addr = 0x00f1, ! DW_OP_GNU_implicit_pointer = 0x00f2, ! DW_OP_GNU_entry_value = 0x00f3, ! DW_OP_PGI_omp_thread_num = 0x00f8, DW_OP_hi_user = 0x00ff }; *************** *** 618,621 **** --- 642,646 ---- DW_CC_nocall = 0x0003, DW_CC_lo_user = 0x0040, + DW_CC_GNU_borland_fastcall_i386 = 0x0041, DW_CC_ALTIUM_interrupt = 0x0065, DW_CC_ALTIUM_near_system_stack = 0x0066, *************** *** 672,676 **** DW_LNE_HP_negate_front_end_logical = 0x0019, DW_LNE_HP_define_proc = 0x0020, ! DW_LNE_lo_user = 0x0080, DW_LNE_hi_user = 0x00ff }; --- 697,701 ---- DW_LNE_HP_negate_front_end_logical = 0x0019, DW_LNE_HP_define_proc = 0x0020, ! DW_LNE_HP_source_file_correlation = 0x0080, DW_LNE_hi_user = 0x00ff }; Index: dwarf_names.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dwarf_names.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dwarf_names.c 11 Nov 2011 10:27:24 -0000 1.1 --- dwarf_names.c 22 Feb 2012 13:55:02 -0000 1.2 *************** *** 1,4 **** /* Generated routines, do not edit. */ ! /* Generated on Nov 11 2011 10:24:05 */ /* BEGIN FILE */ --- 1,4 ---- /* Generated routines, do not edit. */ ! /* Generated on Feb 22 2012 12:46:56 */ /* BEGIN FILE */ *************** *** 229,232 **** --- 229,238 ---- *s_out = "DW_TAG_GNU_formal_parameter_pack"; return DW_DLV_OK; + case DW_TAG_GNU_call_site: + *s_out = "DW_TAG_GNU_call_site"; + return DW_DLV_OK; + case DW_TAG_GNU_call_site_parameter: + *s_out = "DW_TAG_GNU_call_site_parameter"; + return DW_DLV_OK; case DW_TAG_SUN_function_template: *s_out = "DW_TAG_SUN_function_template"; *************** *** 799,805 **** --- 805,859 ---- *s_out = "DW_AT_GNU_vector"; return DW_DLV_OK; + case DW_AT_GNU_guarded_by: + *s_out = "DW_AT_GNU_guarded_by"; + return DW_DLV_OK; + case DW_AT_GNU_pt_guarded_by: + *s_out = "DW_AT_GNU_pt_guarded_by"; + return DW_DLV_OK; + case DW_AT_GNU_guarded: + *s_out = "DW_AT_GNU_guarded"; + return DW_DLV_OK; + case DW_AT_GNU_pt_guarded: + *s_out = "DW_AT_GNU_pt_guarded"; + return DW_DLV_OK; + case DW_AT_GNU_locks_excluded: + *s_out = "DW_AT_GNU_locks_excluded"; + return DW_DLV_OK; + case DW_AT_GNU_exclusive_locks_required: + *s_out = "DW_AT_GNU_exclusive_locks_required"; + return DW_DLV_OK; + case DW_AT_GNU_shared_locks_required: + *s_out = "DW_AT_GNU_shared_locks_required"; + return DW_DLV_OK; + case DW_AT_GNU_odr_signature: + *s_out = "DW_AT_GNU_odr_signature"; + return DW_DLV_OK; case DW_AT_GNU_template_name: *s_out = "DW_AT_GNU_template_name"; return DW_DLV_OK; + case DW_AT_GNU_call_site_value: + *s_out = "DW_AT_GNU_call_site_value"; + return DW_DLV_OK; + case DW_AT_GNU_call_site_data_value: + *s_out = "DW_AT_GNU_call_site_data_value"; + return DW_DLV_OK; + case DW_AT_GNU_call_site_target: + *s_out = "DW_AT_GNU_call_site_target"; + return DW_DLV_OK; + case DW_AT_GNU_call_site_target_clobbered: + *s_out = "DW_AT_GNU_call_site_target_clobbered"; + return DW_DLV_OK; + case DW_AT_GNU_tail_call: + *s_out = "DW_AT_GNU_tail_call"; + return DW_DLV_OK; + case DW_AT_GNU_all_tail_call_sites: + *s_out = "DW_AT_GNU_all_tail_call_sites"; + return DW_DLV_OK; + case DW_AT_GNU_all_call_sites: + *s_out = "DW_AT_GNU_all_call_sites"; + return DW_DLV_OK; + case DW_AT_GNU_all_source_call_sites: + *s_out = "DW_AT_GNU_all_source_call_sites"; + return DW_DLV_OK; case DW_AT_SUN_template: *s_out = "DW_AT_SUN_template"; *************** *** 943,946 **** --- 997,1006 ---- *s_out = "DW_AT_ALTIUM_loclist"; return DW_DLV_OK; + case DW_AT_use_GNAT_descriptive_type: + *s_out = "DW_AT_use_GNAT_descriptive_type"; + return DW_DLV_OK; + case DW_AT_GNAT_descriptive_type: + *s_out = "DW_AT_GNAT_descriptive_type"; + return DW_DLV_OK; case DW_AT_upc_threads_scaled: *s_out = "DW_AT_upc_threads_scaled"; *************** *** 1473,1478 **** *s_out = "DW_OP_INTEL_bit_piece"; return DW_DLV_OK; ! case DW_OP_APPLE_uninit: ! *s_out = "DW_OP_APPLE_uninit"; return DW_DLV_OK; case DW_OP_hi_user: --- 1533,1550 ---- *s_out = "DW_OP_INTEL_bit_piece"; return DW_DLV_OK; ! case DW_OP_GNU_uninit: ! *s_out = "DW_OP_GNU_uninit"; ! return DW_DLV_OK; ! case DW_OP_GNU_encoded_addr: ! *s_out = "DW_OP_GNU_encoded_addr"; ! return DW_DLV_OK; ! case DW_OP_GNU_implicit_pointer: ! *s_out = "DW_OP_GNU_implicit_pointer"; ! return DW_DLV_OK; ! case DW_OP_GNU_entry_value: ! *s_out = "DW_OP_GNU_entry_value"; ! return DW_DLV_OK; ! case DW_OP_PGI_omp_thread_num: ! *s_out = "DW_OP_PGI_omp_thread_num"; return DW_DLV_OK; case DW_OP_hi_user: *************** *** 1829,1832 **** --- 1901,1907 ---- *s_out = "DW_CC_lo_user"; return DW_DLV_OK; + case DW_CC_GNU_borland_fastcall_i386: + *s_out = "DW_CC_GNU_borland_fastcall_i386"; + return DW_DLV_OK; case DW_CC_ALTIUM_interrupt: *s_out = "DW_CC_ALTIUM_interrupt"; *************** *** 1986,1991 **** *s_out = "DW_LNE_HP_define_proc"; return DW_DLV_OK; ! case DW_LNE_lo_user: ! *s_out = "DW_LNE_lo_user"; return DW_DLV_OK; case DW_LNE_hi_user: --- 2061,2066 ---- *s_out = "DW_LNE_HP_define_proc"; return DW_DLV_OK; ! case DW_LNE_HP_source_file_correlation: ! *s_out = "DW_LNE_HP_source_file_correlation"; return DW_DLV_OK; case DW_LNE_hi_user: Index: libdwarf2p.1.mm =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/libdwarf2p.1.mm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** libdwarf2p.1.mm 11 Nov 2011 10:27:24 -0000 1.7 --- libdwarf2p.1.mm 22 Feb 2012 13:55:03 -0000 1.8 *************** *** 12,16 **** \." ============================================== \." Put current date in the following at each rev ! .ds vE rev 1.30, 12 June 2011 \." ============================================== \." ============================================== --- 12,16 ---- \." ============================================== \." Put current date in the following at each rev ! .ds vE rev 1.32, 13 December 2011 \." ============================================== \." ============================================== *************** *** 1804,1810 **** \f(CWDW_DLC_SYMBOLIC_RELOCATIONS\fP. ! .H 3 "dwarf_add_line_entry()" .DS ! \f(CWDwarf_Unsigned dwarf_add_line_entry( Dwarf_P_Debug dbg, Dwarf_Unsigned file_index, --- 1804,1810 ---- \f(CWDW_DLC_SYMBOLIC_RELOCATIONS\fP. ! .H 3 "dwarf_add_line_entry_b()" .DS ! \f(CWDwarf_Unsigned dwarf_add_line_entry_b( Dwarf_P_Debug dbg, Dwarf_Unsigned file_index, *************** *** 1814,1817 **** --- 1814,1821 ---- Dwarf_Bool is_source_stmt_begin, Dwarf_Bool is_basic_block_begin, + Dwarf_Bool is_epilogue_begin, + Dwarf_Bool is_prologue_end, + Dwarf_Unsigned isa, + Dwarf_Unsigned discriminator, Dwarf_Error *error)\fP .DE *************** *** 1819,1825 **** section containing information about source lines. It specifies ! in \f(CWcode_offset\fP, the offset from the address set using ! \f(CWdwarf_lne_set_address()\fP, of the address of the first ! instruction in a contiguous block. The source file that gave rise to the instruction is specified by \f(CWfile_index\fP, the source --- 1823,1832 ---- section containing information about source lines. It specifies ! in \f(CWcode_offset\fP, the address of this line. ! The function subtracts \f(CWcode_offset\fP from the value given ! as the address of a previous line call to compute an offset, ! and the offset is what is recorded in the line instructions ! so no relocation will be needed on the line instruction generated. ! .P The source file that gave rise to the instruction is specified by \f(CWfile_index\fP, the source *************** *** 1839,1844 **** --- 1846,1888 ---- a basic block. + \f(CWis_epilogue_begin\fP is a boolean flag that is true only if + the instruction at \f(CWcode_address\fP is the first instruction in + the sequence generated for the function epilogue code. + + Similarly, \f(CWis_prolgue_end\fP is a boolean flag that is true only if + the instruction at \f(CWcode_address\fP is the last instruction of + the seqence generated for the function prologue. + + \f(CWisa\fP should be zero unless the code + at \f(CWcode_address\fP is generated in a non-standard isa. + The values assigned to non-standard isas are defined by the compiler + implementation. + + \f(CWdiscriminator\fP should be zero unless the line table + needs to distinguish among multiple blocks + associated with the same source file, line, and column. + The values assigned to \f(CWdiscriminator\fP are defined by the compiler + implementation. + It returns \f(CW0\fP on success, and \f(CWDW_DLV_NOCOUNT\fP on error. + This function is defined as of December 2011. + + .H 3 "dwarf_add_line_entry()" + .DS + \f(CWDwarf_Unsigned dwarf_add_line_entry( + Dwarf_P_Debug dbg, + Dwarf_Unsigned file_index, + Dwarf_Addr code_offset, + Dwarf_Unsigned lineno, + Dwarf_Signed column_number, + Dwarf_Bool is_source_stmt_begin, + Dwarf_Bool is_basic_block_begin, + Dwarf_Error *error)\fP + .DE + This function is the same as \f(CWdwarf_add_line_entry_b()\fP + except this older version is missing the new + DWARF3/4 line table fields. + .H 3 "dwarf_lne_set_address()" .DS *************** *** 1876,1880 **** should be just higher than the end of the last address in the sequence of instructions. ! block of instructions, a call to \f(CWdwarf_lne_set_address()\fP will have to be made to set the address of the start of the target address of the block, followed by calls to \f(CWdwarf_add_line_entry()\fP for --- 1920,1925 ---- should be just higher than the end of the last address in the sequence of instructions. ! Before the next ! block of instructions (if any) a call to \f(CWdwarf_lne_set_address()\fP will have to be made to set the address of the start of the target address of the block, followed by calls to \f(CWdwarf_add_line_entry()\fP for *************** *** 1900,1905 **** directories for the object. This index is then used to refer to this ! string. ! It returns \f(CWDW_DLV_NOCOUNT\fP on error. .H 3 "dwarf_add_file_decl()" --- 1945,1954 ---- directories for the object. This index is then used to refer to this ! string. The first successful call of this function ! returns one, not zero, to be consistent with the directory indices ! that \f(CWdwarf_add_file_decl()\fP (below) expects.. ! ! \f(CWdwarf_add_directory_decl()\fP ! returns \f(CWDW_DLV_NOCOUNT\fP on error. .H 3 "dwarf_add_file_decl()" *************** *** 1919,1927 **** or a null pointer, it must point to a string with length greater than 0). In case the name is not a fully-qualified ! pathname, it is prefixed with the name of the directory specified by ! \f(CWdir_idx\fP. \f(CWdir_idx\fP is the index of the directory to be prefixed in the list builtup using \f(CWdwarf_add_directory_decl()\fP. \f(CWtime_mod\fP gives the time at which the file was last modified, --- 1968,1985 ---- or a null pointer, it must point to a string with length greater than 0). + In case the name is not a fully-qualified ! pathname, it is ! considered prefixed with the name of the directory specified by ! \f(CWdir_idx\fP (which does not mean the \f(CWname\fP ! is changed or physically prefixed by ! this producer function, we simply describe the meaning here). \f(CWdir_idx\fP is the index of the directory to be prefixed in the list builtup using \f(CWdwarf_add_directory_decl()\fP. + As specified by the DWARF spec, a \f(CWdir_idx\fP of zero will be + interpreted as meaning the directory of the compilation and + another index must refer to a valid directory as + FIXME + \f(CWtime_mod\fP gives the time at which the file was last modified, Index: dwarf_names.h =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dwarf_names.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dwarf_names.h 11 Nov 2011 10:27:24 -0000 1.1 --- dwarf_names.h 22 Feb 2012 13:55:02 -0000 1.2 *************** *** 1,4 **** /* Generated routines, do not edit. */ ! /* Generated on Nov 11 2011 10:24:05 */ /* BEGIN FILE */ --- 1,4 ---- /* Generated routines, do not edit. */ ! /* Generated on Feb 22 2012 12:46:56 */ /* BEGIN FILE */ Index: dwarf_frame.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dwarf_frame.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dwarf_frame.c 11 Nov 2011 10:27:24 -0000 1.10 --- dwarf_frame.c 22 Feb 2012 13:55:02 -0000 1.11 *************** *** 745,749 **** number. The second is a signed factored offset. Identical to DW_CFA_offset_extended except the ! secondoperand is signed */ Dwarf_Unsigned lreg; --- 745,749 ---- number. The second is a signed factored offset. Identical to DW_CFA_offset_extended except the ! second operand is signed */ Dwarf_Unsigned lreg; Index: pro_line.h =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/pro_line.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pro_line.h 11 Nov 2011 10:27:24 -0000 1.5 --- pro_line.h 22 Feb 2012 13:55:03 -0000 1.6 *************** *** 36,41 **** - #define VERSION 2 #if defined(__i386) || defined(__x86_64) #define MIN_INST_LENGTH 1 --- 36,43 ---- + #define DW_LINE_VERSION2 2 + #define DW_LINE_VERSION3 3 + #define DW_LINE_VERSION4 4 #if defined(__i386) || defined(__x86_64) #define MIN_INST_LENGTH 1 *************** *** 49,53 **** #define LINE_RANGE 4 ! #define OPCODE_BASE 10 #define MAX_OPCODE 255 --- 51,55 ---- #define LINE_RANGE 4 ! #define OPCODE_BASE 10 /* DWARF2. 13 in DWARF3, DWARF4 */ #define MAX_OPCODE 255 *************** *** 103,106 **** --- 105,114 ---- Dwarf_P_Line dpl_next; + + Dwarf_Ubyte dpl_prologue_end; /* DWARF3 */ + Dwarf_Ubyte dpl_epilogue_begin; /* DWARF3 */ + Dwarf_Unsigned dpl_isa; /* DWARF3 */ + Dwarf_Unsigned dpl_discriminator; /* DWARF4 */ + }; *************** *** 109,111 **** pro_line.c */ ! void _dwarf_pro_reg_init(Dwarf_P_Line); --- 117,121 ---- pro_line.c */ ! void _dwarf_pro_reg_init(Dwarf_P_Debug dbg,Dwarf_P_Line); ! ! void _dwarf_init_default_line_header_vals(Dwarf_P_Debug dbg); Index: pro_line.c =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/pro_line.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pro_line.c 11 Nov 2011 10:27:24 -0000 1.5 --- pro_line.c 22 Feb 2012 13:55:03 -0000 1.6 *************** *** 47,50 **** --- 47,51 ---- #include "pro_line.h" + static Dwarf_Unsigned _dwarf_pro_add_line_entry(Dwarf_P_Debug, Dwarf_Unsigned file_index, *************** *** 56,59 **** --- 57,64 ---- Dwarf_Bool is_bb_begin, Dwarf_Ubyte opc, + Dwarf_Bool isepilbeg, + Dwarf_Bool isprolend, + Dwarf_Unsigned isa, + Dwarf_Unsigned discriminator, Dwarf_Error * error); *************** *** 67,86 **** this internal routine. */ Dwarf_Unsigned dwarf_add_line_entry(Dwarf_P_Debug dbg, Dwarf_Unsigned file_index, Dwarf_Addr code_address, Dwarf_Unsigned line_no, ! Dwarf_Signed col_no, Dwarf_Bool is_stmt_begin, Dwarf_Bool is_bb_begin, Dwarf_Error * error) { ! Dwarf_Unsigned retval; ! retval = _dwarf_pro_add_line_entry(dbg, file_index, code_address, 0, line_no, col_no, is_stmt_begin, ! is_bb_begin, 0, error); return retval; } /* Ask to emit DW_LNE_set_address opcode explicitly. Used by be to emit start of a new .text section, or to force a relocated --- 72,140 ---- this internal routine. */ Dwarf_Unsigned + dwarf_add_line_entry_b(Dwarf_P_Debug dbg, + Dwarf_Unsigned file_index, + Dwarf_Addr code_address, + Dwarf_Unsigned line_no, + Dwarf_Signed col_no, + Dwarf_Bool is_stmt_begin, + Dwarf_Bool is_bb_begin, + Dwarf_Bool isepilbeg, + Dwarf_Bool isprolend, + Dwarf_Unsigned isa, + Dwarf_Unsigned discriminator, + Dwarf_Error * error) + { + Dwarf_Unsigned retval = 0; + Dwarf_Ubyte opc = 0; + Dwarf_Unsigned symidx = 0; + + retval = _dwarf_pro_add_line_entry(dbg, file_index, code_address, + symidx, + line_no, col_no, is_stmt_begin, + is_bb_begin, + opc, + isepilbeg,isprolend,isa,discriminator, error); + return retval; + } + Dwarf_Unsigned dwarf_add_line_entry(Dwarf_P_Debug dbg, Dwarf_Unsigned file_index, Dwarf_Addr code_address, Dwarf_Unsigned line_no, ! Dwarf_Signed col_no, /* Wrong, should be unsigned. */ Dwarf_Bool is_stmt_begin, Dwarf_Bool is_bb_begin, Dwarf_Error * error) { ! Dwarf_Unsigned retval = 0; ! Dwarf_Ubyte opc = 0; ! Dwarf_Unsigned symidx = 0; ! Dwarf_Bool isepilbeg = 0; ! Dwarf_Bool isprolend = 0; ! Dwarf_Unsigned isa = 0; ! Dwarf_Unsigned discriminator = 0; ! retval = _dwarf_pro_add_line_entry(dbg, file_index, code_address, ! symidx, line_no, col_no, is_stmt_begin, ! is_bb_begin, ! opc, ! isepilbeg, isprolend, isa, discriminator, ! error); return retval; } + void + _dwarf_init_default_line_header_vals(Dwarf_P_Debug dbg) + { + dbg->de_line_inits.pi_version = DW_LINE_VERSION2; + dbg->de_line_inits.pi_default_is_stmt = DEFAULT_IS_STMT; + dbg->de_line_inits.pi_minimum_instruction_length = MIN_INST_LENGTH; + dbg->de_line_inits.pi_maximum_operations_per_instruction = 1; + dbg->de_line_inits.pi_opcode_base = OPCODE_BASE; + dbg->de_line_inits.pi_line_base = LINE_BASE; + dbg->de_line_inits.pi_line_range = LINE_RANGE; + } + + /* Ask to emit DW_LNE_set_address opcode explicitly. Used by be to emit start of a new .text section, or to force a relocated *************** *** 91,100 **** Dwarf_Unsigned symidx, Dwarf_Error * error) { ! Dwarf_Ubyte opc; ! Dwarf_Unsigned retval; opc = DW_LNE_set_address; retval = ! _dwarf_pro_add_line_entry(dbg, 0, offs, symidx, 0, 0, 0, 0, opc, error); return retval; --- 145,169 ---- Dwarf_Unsigned symidx, Dwarf_Error * error) { ! Dwarf_Ubyte opc = 0; ! Dwarf_Unsigned retval = 0; ! Dwarf_Unsigned file_index = 0; ! Dwarf_Unsigned line_no = 0; ! Dwarf_Signed col_no = 0; ! Dwarf_Bool is_stmt = 0; ! Dwarf_Bool is_bb = 0; ! Dwarf_Bool isepilbeg = 0; ! Dwarf_Bool isprolend = 0; ! Dwarf_Unsigned isa = 0; ! Dwarf_Unsigned discriminator = 0; ! opc = DW_LNE_set_address; retval = ! _dwarf_pro_add_line_entry(dbg, file_index, offs, ! symidx, ! line_no, col_no, is_stmt, ! is_bb, ! opc, ! isepilbeg, isprolend, isa, discriminator, error); return retval; *************** *** 108,118 **** Dwarf_Addr end_address, Dwarf_Error * error) { ! Dwarf_Ubyte opc; ! Dwarf_Unsigned retval; opc = DW_LNE_end_sequence; retval = ! _dwarf_pro_add_line_entry(dbg, 0, end_address, 0, 0, 0, 0, 0, ! opc, error); return retval; } --- 177,202 ---- Dwarf_Addr end_address, Dwarf_Error * error) { ! Dwarf_Ubyte opc = 0; ! Dwarf_Unsigned retval = 0; ! Dwarf_Unsigned file_index = 0; ! Dwarf_Unsigned symidx = 0; ! Dwarf_Unsigned line_no = 0; ! Dwarf_Bool is_stmt = 0; ! Dwarf_Bool is_bb = 0; ! Dwarf_Signed col_no = 0;/* Wrong, should be unsigned. */ ! Dwarf_Bool isepilbeg = 0; ! Dwarf_Bool isprolend = 0; ! Dwarf_Unsigned isa = 0; ! Dwarf_Unsigned discriminator = 0; opc = DW_LNE_end_sequence; retval = ! _dwarf_pro_add_line_entry(dbg, file_index, end_address, ! symidx, ! line_no, col_no, is_stmt, ! is_bb, ! opc, ! isepilbeg, isprolend, isa, discriminator, ! error); return retval; } *************** *** 122,126 **** an entry in the matrix. During opcodes generation time, these opcodes will be used. */ ! Dwarf_Unsigned _dwarf_pro_add_line_entry(Dwarf_P_Debug dbg, Dwarf_Unsigned file_index, --- 206,210 ---- an entry in the matrix. During opcodes generation time, these opcodes will be used. */ ! static Dwarf_Unsigned _dwarf_pro_add_line_entry(Dwarf_P_Debug dbg, Dwarf_Unsigned file_index, *************** *** 131,135 **** Dwarf_Bool is_stmt_begin, Dwarf_Bool is_bb_begin, ! Dwarf_Ubyte opc, Dwarf_Error * error) { if (dbg->de_lines == NULL) { --- 215,224 ---- Dwarf_Bool is_stmt_begin, Dwarf_Bool is_bb_begin, ! Dwarf_Ubyte opc, ! Dwarf_Bool isepilbeg, ! Dwarf_Bool isprolend, ! Dwarf_Unsigned isa, ! Dwarf_Unsigned discriminator, ! Dwarf_Error * error) { if (dbg->de_lines == NULL) { *************** *** 140,144 **** } dbg->de_last_line = dbg->de_lines; ! _dwarf_pro_reg_init(dbg->de_lines); } else { --- 229,233 ---- } dbg->de_last_line = dbg->de_lines; ! _dwarf_pro_reg_init(dbg,dbg->de_lines); } else { *************** *** 149,153 **** } dbg->de_last_line = dbg->de_last_line->dpl_next; ! _dwarf_pro_reg_init(dbg->de_last_line); } dbg->de_last_line->dpl_address = code_address; --- 238,242 ---- } dbg->de_last_line = dbg->de_last_line->dpl_next; ! _dwarf_pro_reg_init(dbg,dbg->de_last_line); } dbg->de_last_line->dpl_address = code_address; *************** *** 159,163 **** dbg->de_last_line->dpl_opc = opc; dbg->de_last_line->dpl_r_symidx = symidx; ! return (0); } --- 248,255 ---- dbg->de_last_line->dpl_opc = opc; dbg->de_last_line->dpl_r_symidx = symidx; ! dbg->de_last_line->dpl_prologue_end = isprolend; ! dbg->de_last_line->dpl_epilogue_begin = isepilbeg; ! dbg->de_last_line->dpl_isa = isa; ! dbg->de_last_line->dpl_discriminator = discriminator; return (0); } *************** *** 198,202 **** /* Add a file entry declaration to the debug_line section. Stored ! in linked list. The data is immediately encodes as leb128 and stored in Dwarf_P_F_Entry_s struct. */ Dwarf_Unsigned --- 290,294 ---- /* Add a file entry declaration to the debug_line section. Stored ! in linked list. The data is immediately encoded as leb128 and stored in Dwarf_P_F_Entry_s struct. */ Dwarf_Unsigned *************** *** 276,280 **** initialize the struct corresponding to it */ void ! _dwarf_pro_reg_init(Dwarf_P_Line cur_line) { cur_line->dpl_address = 0; --- 368,372 ---- initialize the struct corresponding to it */ void ! _dwarf_pro_reg_init(Dwarf_P_Debug dbg, Dwarf_P_Line cur_line) { cur_line->dpl_address = 0; *************** *** 282,287 **** cur_line->dpl_line = 1; cur_line->dpl_column = 0; ! cur_line->dpl_is_stmt = DEFAULT_IS_STMT; cur_line->dpl_basic_block = false; cur_line->dpl_next = NULL; } --- 374,384 ---- cur_line->dpl_line = 1; cur_line->dpl_column = 0; ! cur_line->dpl_is_stmt = dbg->de_line_inits.pi_default_is_stmt; cur_line->dpl_basic_block = false; cur_line->dpl_next = NULL; + cur_line->dpl_prologue_end = 0; + cur_line->dpl_epilogue_begin = 0; + cur_line->dpl_isa = 0; + cur_line->dpl_discriminator = 0; + cur_line->dpl_opc = 0; } Index: libdwarf2.1.mm =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/libdwarf2.1.mm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** libdwarf2.1.mm 11 Nov 2011 10:27:24 -0000 1.10 --- libdwarf2.1.mm 22 Feb 2012 13:55:02 -0000 1.11 *************** *** 9,13 **** \." ============================================== \." Put current date in the following at each rev ! .ds vE rev 2.00, October 29, 2011 \." ============================================== \." ============================================== --- 9,13 ---- \." ============================================== \." Put current date in the following at each rev ! .ds vE rev 2.02, December 13, 2011 \." ============================================== \." ============================================== *************** *** 78,82 **** (which the committee never endorsed, having decided not to endorse or approve any particular library interface) ! was made available on the internet by Silcon Graphics, Inc. .P In 2005 the DWARF committee began an affiliation with FreeStandards.org. --- 78,82 ---- (which the committee never endorsed, having decided not to endorse or approve any particular library interface) ! was made available on the internet by Silicon Graphics, Inc. .P In 2005 the DWARF committee began an affiliation with FreeStandards.org. *************** *** 1582,1586 **** \f(CWabbrev_offset\fP, \f(CWaddress_size\fP, \f(CWoffset_size\fP, \f(CWextension_size\fP, ! \f(CWsignatyre\fP, or \f(CWtypeoffset\fP, is \f(CWNULL\fP, the argument is ignored (meaning it is not an error to provide a --- 1582,1586 ---- \f(CWabbrev_offset\fP, \f(CWaddress_size\fP, \f(CWoffset_size\fP, \f(CWextension_size\fP, ! \f(CWsignature\fP, or \f(CWtypeoffset\fP, is \f(CWNULL\fP, the argument is ignored (meaning it is not an error to provide a *************** *** 3251,3258 **** the column number at which the statement represented by \f(CWline\fP begins. ! It sets \f(CWreturn_lineoff\fP to \fI-1\fP if the column number of the statement is not represented (meaning the producer library call was given zero ! as the column number). .P On error it returns \f(CWDW_DLV_ERROR\fP. --- 3251,3271 ---- the column number at which the statement represented by \f(CWline\fP begins. ! .P ! It sets \f(CWreturn_lineoff\fP to zero if the column number of the statement is not represented (meaning the producer library call was given zero ! as the column number). Zero is the correct value meaning "left edge" ! as defined in the DWARF2/3/4 specication (section 6.2.2). ! .P ! Before December 2011 zero was not returned through ! the \f(CWreturn_lineoff\fP pointer, -1 was returned through the pointer. ! The reason for this oddity is unclear, lost in history. ! But there is no good reason for -1. ! .P ! The type of \f(CWreturn_lineoff\fP is a pointer-to-signed, but there ! is no good reason for the value to be signed, the DWARF specification ! does not deal with negative column numbers. However, changing the ! declaration would cause compilation errors for little benefit, so ! the pointer-to-signed is left unchanged. .P On error it returns \f(CWDW_DLV_ERROR\fP. *************** *** 3326,3329 **** --- 3339,3367 ---- necessary. + .H 4 "dwarf_prologue_end_etc()" + .DS + \f(CWint dwarf_prologue_end_etc(Dwarf_Line line, + Dwarf_Bool * prologue_end, + Dwarf_Bool * epilogue_begin, + Dwarf_Unsigned * isa, + Dwarf_Unsigned * discriminator, + Dwarf_Error * error)\fP + .DE + The function + \f(CWdwarf_prologue_end_etc()\fP returns + \f(CWDW_DLV_OK\fP and sets the returned fields to + values currently set. + While it is pretty safe to assume that the + \f(CWisa\fP + and + \f(CWdiscriminator\fP + values returned are very small integers, there is + no restriction in the standard. + It returns \f(CWDW_DLV_ERROR\fP on error. + It never returns \f(CWDW_DLV_NO_ENTRY\fP. + + This function is new in December 2011. + + .H 2 "Global Name Space Operations" These operations operate on the .debug_pubnames section of the debugging Index: dwarf_line.h =================================================================== RCS file: /cvsroot/ups/ups/lib/libdwarf/dw... [truncated message content] |
From: Tom H. <th...@us...> - 2012-02-22 12:32:49
|
Update of /cvsroot/ups/ups/ups In directory vz-cvs-3.sog:/tmp/cvs-serv15752/ups Modified Files: ao_dwarf.c Log Message: Handle DW_FORM_flag_present from DWARF4. Index: ao_dwarf.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwarf.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ao_dwarf.c 14 Feb 2007 14:59:46 -0000 1.4 --- ao_dwarf.c 22 Feb 2012 12:32:46 -0000 1.5 *************** *** 677,680 **** --- 677,682 ---- if ((rv = dwarf_formflag(attribute, &val, &err)) != DW_DLV_OK) dwf_fatal_error("dwarf_formflag", rv, die, err); + } else if (form == DW_FORM_flag_present) { + val = 1; } else { dwf_fatal_error("attribute form not flag", 0, die, err); |
From: Tom H. <th...@us...> - 2011-11-11 10:27:27
|
Update of /cvsroot/ups/ups/lib/libdwarf/cmplrs In directory vz-cvs-3.sog:/tmp/cvs-serv28071/cmplrs Modified Files: dwarf_addr_finder.h Log Message: Update libdwarf to 20111030 version. |
From: Tom H. <th...@us...> - 2010-10-14 14:22:58
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11677/ups Modified Files: ao_ptrace.c Log Message: Recalculate breakpoint address after the target has started. Index: ao_ptrace.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_ptrace.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ao_ptrace.c 13 Jul 2009 13:47:37 -0000 1.13 --- ao_ptrace.c 14 Oct 2010 14:22:49 -0000 1.14 *************** *** 590,593 **** --- 590,594 ---- elf_update_dynamic_solibs(xp->xp_apool, xp->xp_textpath, &ip->ip_solibs, TRUE); + recalculate_bpt_addrs(xp); if (get_startup_stop_addrs(xp, &main_addr, &main_min_bpt_addr) != 0) return -1; |
From: Tom H. <th...@us...> - 2010-10-14 12:03:44
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv6973/ups Modified Files: ao_dwfutil.c Log Message: Revert accidental commit. Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ao_dwfutil.c 14 Oct 2010 12:01:48 -0000 1.20 --- ao_dwfutil.c 14 Oct 2010 12:03:36 -0000 1.21 *************** *** 588,597 **** vaddr->v_op = OP_SP_RELATIVE; vaddr->v_offset = (Dwarf_Signed)loclist[i]->ld_s->lr_number; - } else if (op == DW_OP_call_frame_cfa) { - /* - * Call frame address - */ - vaddr->v_op = OP_CFA_RELATIVE; - vaddr->v_register = 0; } else { panic("dwf_get_location : unsupported opcode in location expression"); --- 588,591 ---- |
From: Tom H. <th...@us...> - 2010-10-14 12:01:56
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv6636/ups Modified Files: ao_dwfutil.c Log Message: Revert accidental commit. Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ao_dwfutil.c 14 Oct 2010 11:58:13 -0000 1.19 --- ao_dwfutil.c 14 Oct 2010 12:01:48 -0000 1.20 *************** *** 525,535 **** vaddr = (vaddr_t *)alloc(ap, sizeof(vaddr_t)); ! if (head == NULL) { head = vaddr; ! } else { ! errf("dwf_get_location : location list too long"); ! head = NULL; ! break; ! } if (loclist[i]->ld_cents != 1) --- 525,532 ---- vaddr = (vaddr_t *)alloc(ap, sizeof(vaddr_t)); ! if (head == NULL) head = vaddr; ! else ! panic("dwf_get_location : location list too long"); if (loclist[i]->ld_cents != 1) *************** *** 565,573 **** * Relative to frame base address. */ ! if (frame_base == BAD_FRAME_BASE) { ! errf("dwf_get_location : frame base not known"); ! head = NULL; ! break; ! } if (frame_base && frame_base->v_op == OP_REGISTER) { if (frame_base->v_register == fp_reg) { vaddr->v_op = OP_FP_RELATIVE; --- 562,566 ---- * Relative to frame base address. */ ! if (frame_base && frame_base->v_op == OP_REGISTER) { if (frame_base->v_register == fp_reg) { vaddr->v_op = OP_FP_RELATIVE; |
From: Tom H. <th...@us...> - 2010-10-14 11:58:22
|
Update of /cvsroot/ups/ups/ups In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5384/ups Modified Files: ao_dwfutil.c Log Message: Use the new libdwarf reg3 interface to stack unwinding. Index: ao_dwfutil.c =================================================================== RCS file: /cvsroot/ups/ups/ups/ao_dwfutil.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ao_dwfutil.c 7 Jul 2009 15:42:44 -0000 1.18 --- ao_dwfutil.c 14 Oct 2010 11:58:13 -0000 1.19 *************** *** 525,532 **** vaddr = (vaddr_t *)alloc(ap, sizeof(vaddr_t)); ! if (head == NULL) head = vaddr; ! else ! panic("dwf_get_location : location list too long"); if (loclist[i]->ld_cents != 1) --- 525,535 ---- vaddr = (vaddr_t *)alloc(ap, sizeof(vaddr_t)); ! if (head == NULL) { head = vaddr; ! } else { ! errf("dwf_get_location : location list too long"); ! head = NULL; ! break; ! } if (loclist[i]->ld_cents != 1) *************** *** 562,566 **** * Relative to frame base address. */ ! if (frame_base && frame_base->v_op == OP_REGISTER) { if (frame_base->v_register == fp_reg) { vaddr->v_op = OP_FP_RELATIVE; --- 565,573 ---- * Relative to frame base address. */ ! if (frame_base == BAD_FRAME_BASE) { ! errf("dwf_get_location : frame base not known"); ! head = NULL; ! break; ! } if (frame_base && frame_base->v_op == OP_REGISTER) { if (frame_base->v_register == fp_reg) { vaddr->v_op = OP_FP_RELATIVE; *************** *** 588,591 **** --- 595,604 ---- vaddr->v_op = OP_SP_RELATIVE; vaddr->v_offset = (Dwarf_Signed)loclist[i]->ld_s->lr_number; + } else if (op == DW_OP_call_frame_cfa) { + /* + * Call frame address + */ + vaddr->v_op = OP_CFA_RELATIVE; + vaddr->v_register = 0; } else { panic("dwf_get_location : unsupported opcode in location expression"); *************** *** 611,617 **** int rv; Dwarf_Error err; Dwarf_Signed offset_relevant; Dwarf_Signed register_num; ! Dwarf_Signed offset; int fp_col; int sp_col; --- 624,632 ---- int rv; Dwarf_Error err; + Dwarf_Small value_type; Dwarf_Signed offset_relevant; Dwarf_Signed register_num; ! Dwarf_Signed offset_or_block_len; ! Dwarf_Ptr block_ptr; int fp_col; int sp_col; *************** *** 631,638 **** } ! if ((rv = dwarf_get_fde_info_for_reg(fde, regnum, pc, &offset_relevant, ! ®ister_num, &offset, NULL, ! &err)) == DW_DLV_OK) { ! if (register_num == DW_FRAME_CFA_COL) *regval = cfa; else if (register_num == fp_col) --- 646,666 ---- } ! if (regnum == DW_FRAME_CFA_COL3) { ! rv = dwarf_get_fde_info_for_cfa_reg3(fde, pc, &value_type, ! &offset_relevant, ®ister_num, ! &offset_or_block_len, &block_ptr, ! NULL, &err); ! } else { ! rv = dwarf_get_fde_info_for_reg3(fde, regnum, pc, &value_type, ! &offset_relevant, ®ister_num, ! &offset_or_block_len, &block_ptr, ! NULL, &err); ! } ! ! if (rv == DW_DLV_OK) { ! if (value_type != DW_EXPR_OFFSET) ! panic("Unsupported value type in unwind info"); ! ! if (register_num == DW_FRAME_CFA_COL3) *regval = cfa; else if (register_num == fp_col) *************** *** 648,654 **** if (rv == DW_DLV_OK && offset_relevant) ! *regval += offset; ! if (rv == DW_DLV_OK && register_num == DW_FRAME_CFA_COL) dread_addrval(xp, *regval, regval); } --- 676,682 ---- if (rv == DW_DLV_OK && offset_relevant) ! *regval += offset_or_block_len; ! if (rv == DW_DLV_OK && register_num == DW_FRAME_CFA_COL3) dread_addrval(xp, *regval, regval); } *************** *** 698,702 **** taddr_t new_pc; ! if (dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, DW_FRAME_CFA_COL, cfa) && dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, ra_col, &new_pc)) { if (!dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, fp_col, &new_fp)) --- 726,730 ---- taddr_t new_pc; ! if (dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, DW_FRAME_CFA_COL3, cfa) && dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, ra_col, &new_pc)) { if (!dwf_unwind_reg(fde, xp, *cfa, *fp, *sp, *pc, fp_col, &new_fp)) |