Lines Matching refs:fc

2837 frame_need_space (Frame_Chunk *fc, int reg)
2839 int prev = fc->ncols;
2841 if (reg < fc->ncols)
2844 fc->ncols = reg + 1;
2845 fc->col_type = xcrealloc (fc->col_type, fc->ncols, sizeof (short int));
2846 fc->col_offset = xcrealloc (fc->col_offset, fc->ncols, sizeof (int));
2848 while (prev < fc->ncols)
2850 fc->col_type[prev] = DW_CFA_unreferenced;
2851 fc->col_offset[prev] = 0;
2857 frame_display_row (Frame_Chunk *fc, int *need_col_headers, int *max_regs)
2862 if (*max_regs < fc->ncols)
2863 *max_regs = fc->ncols;
2872 if (fc->col_type[r] != DW_CFA_unreferenced)
2874 if (r == fc->ra)
2883 printf ("%08lx ", fc->pc_begin);
2884 if (fc->cfa_exp)
2887 sprintf (tmp, "r%d%+d", fc->cfa_reg, fc->cfa_offset);
2890 for (r = 0; r < fc->ncols; r++)
2892 if (fc->col_type[r] != DW_CFA_unreferenced)
2894 switch (fc->col_type[r])
2903 sprintf (tmp, "c%+d", fc->col_offset[r]);
2906 sprintf (tmp, "v%+d", fc->col_offset[r]);
2909 sprintf (tmp, "r%d", fc->col_offset[r]);
2977 Frame_Chunk *fc;
3022 fc = xmalloc (sizeof (Frame_Chunk));
3023 memset (fc, 0, sizeof (Frame_Chunk));
3025 fc->next = chunks;
3026 chunks = fc;
3027 fc->chunk_start = saved_start;
3028 fc->ncols = 0;
3029 fc->col_type = xmalloc (sizeof (short int));
3030 fc->col_offset = xmalloc (sizeof (int));
3031 frame_need_space (fc, max_regs-1);
3035 fc->augmentation = (char *) start;
3038 if (fc->augmentation[0] == 'z')
3040 fc->code_factor = LEB ();
3041 fc->data_factor = SLEB ();
3044 fc->ra = GET (1);
3048 fc->ra = LEB ();
3054 else if (strcmp (fc->augmentation, "eh") == 0)
3057 fc->code_factor = LEB ();
3058 fc->data_factor = SLEB ();
3061 fc->ra = GET (1);
3065 fc->ra = LEB ();
3070 fc->code_factor = LEB ();
3071 fc->data_factor = SLEB ();
3074 fc->ra = GET (1);
3078 fc->ra = LEB ();
3081 cie = fc;
3086 fc->augmentation, fc->code_factor, fc->data_factor,
3087 fc->ra);
3093 printf (" Augmentation: \"%s\"\n", fc->augmentation);
3094 printf (" Code alignment factor: %u\n", fc->code_factor);
3095 printf (" Data alignment factor: %d\n", fc->data_factor);
3096 printf (" Return address column: %d\n", fc->ra);
3112 p = (unsigned char *) fc->augmentation + 1;
3122 fc->fde_encoding = *q++;
3128 if (fc->fde_encoding)
3129 encoded_ptr_size = size_of_encoded_value (fc->fde_encoding);
3132 frame_need_space (fc, fc->ra);
3139 fc = & fde_fc;
3140 memset (fc, 0, sizeof (Frame_Chunk));
3152 fc->ncols = 0;
3153 fc->col_type = xmalloc (sizeof (short int));
3154 fc->col_offset = xmalloc (sizeof (int));
3155 frame_need_space (fc, max_regs - 1);
3156 cie = fc;
3157 fc->augmentation = "";
3158 fc->fde_encoding = 0;
3162 fc->ncols = cie->ncols;
3163 fc->col_type = xcmalloc (fc->ncols, sizeof (short int));
3164 fc->col_offset = xcmalloc (fc->ncols, sizeof (int));
3165 memcpy (fc->col_type, cie->col_type, fc->ncols * sizeof (short int));
3166 memcpy (fc->col_offset, cie->col_offset, fc->ncols * sizeof (int));
3167 fc->augmentation = cie->augmentation;
3168 fc->code_factor = cie->code_factor;
3169 fc->data_factor = cie->data_factor;
3170 fc->cfa_reg = cie->cfa_reg;
3171 fc->cfa_offset = cie->cfa_offset;
3172 fc->ra = cie->ra;
3173 frame_need_space (fc, max_regs-1);
3174 fc->fde_encoding = cie->fde_encoding;
3177 if (fc->fde_encoding)
3178 encoded_ptr_size = size_of_encoded_value (fc->fde_encoding);
3180 fc->pc_begin = get_encoded_value (start, fc->fde_encoding);
3181 if ((fc->fde_encoding & 0x70) == DW_EH_PE_pcrel
3186 fc->pc_begin += section->address + (start - section_start);
3188 fc->pc_range = byte_get (start, encoded_ptr_size);
3201 fc->pc_begin, fc->pc_begin + fc->pc_range);
3214 /* At this point, fc is the current chunk, cie (if any) is set, and
3217 fc->col_type and fc->col_offset arrays, which we write into always.
3245 frame_need_space (fc, opa);
3246 fc->col_type[opa] = DW_CFA_undefined;
3249 frame_need_space (fc, opa);
3250 fc->col_type[opa] = DW_CFA_undefined;
3267 frame_need_space (fc, reg);
3268 fc->col_type[reg] = DW_CFA_undefined;
3272 frame_need_space (fc, reg);
3273 fc->col_type[reg] = DW_CFA_undefined;
3277 frame_need_space (fc, reg);
3278 fc->col_type[reg] = DW_CFA_undefined;
3282 frame_need_space (fc, reg);
3283 fc->col_type[reg] = DW_CFA_undefined;
3287 frame_need_space (fc, reg);
3288 fc->col_type[reg] = DW_CFA_undefined;
3308 frame_need_space (fc, reg);
3309 fc->col_type[reg] = DW_CFA_undefined;
3314 frame_need_space (fc, reg);
3315 fc->col_type[reg] = DW_CFA_undefined;
3331 frame_need_space (fc, reg);
3332 fc->col_type[reg] = DW_CFA_undefined;
3362 frame_display_row (fc, &need_col_headers, &max_regs);
3365 opa * fc->code_factor,
3366 fc->pc_begin + opa * fc->code_factor);
3367 fc->pc_begin += opa * fc->code_factor;
3374 opa, roffs * fc->data_factor);
3375 fc->col_type[opa] = DW_CFA_offset;
3376 fc->col_offset[opa] = roffs * fc->data_factor;
3382 fc->col_type[opa] = cie->col_type[opa];
3383 fc->col_offset[opa] = cie->col_offset[opa];
3387 vma = get_encoded_value (start, fc->fde_encoding);
3388 if ((fc->fde_encoding & 0x70) == DW_EH_PE_pcrel
3393 frame_display_row (fc, &need_col_headers, &max_regs);
3396 fc->pc_begin = vma;
3402 frame_display_row (fc, &need_col_headers, &max_regs);
3405 ofs * fc->code_factor,
3406 fc->pc_begin + ofs * fc->code_factor);
3407 fc->pc_begin += ofs * fc->code_factor;
3413 frame_display_row (fc, &need_col_headers, &max_regs);
3416 ofs * fc->code_factor,
3417 fc->pc_begin + ofs * fc->code_factor);
3418 fc->pc_begin += ofs * fc->code_factor;
3424 frame_display_row (fc, &need_col_headers, &max_regs);
3427 ofs * fc->code_factor,
3428 fc->pc_begin + ofs * fc->code_factor);
3429 fc->pc_begin += ofs * fc->code_factor;
3437 reg, roffs * fc->data_factor);
3438 fc->col_type[reg] = DW_CFA_offset;
3439 fc->col_offset[reg] = roffs * fc->data_factor;
3447 reg, roffs * fc->data_factor);
3448 fc->col_type[reg] = DW_CFA_val_offset;
3449 fc->col_offset[reg] = roffs * fc->data_factor;
3456 fc->col_type[reg] = cie->col_type[reg];
3457 fc->col_offset[reg] = cie->col_offset[reg];
3464 fc->col_type[reg] = DW_CFA_undefined;
3465 fc->col_offset[reg] = 0;
3472 fc->col_type[reg] = DW_CFA_same_value;
3473 fc->col_offset[reg] = 0;
3481 fc->col_type[reg] = DW_CFA_register;
3482 fc->col_offset[reg] = roffs;
3489 rs->ncols = fc->ncols;
3492 memcpy (rs->col_type, fc->col_type, rs->ncols);
3493 memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (int));
3505 frame_need_space (fc, rs->ncols-1);
3506 memcpy (fc->col_type, rs->col_type, rs->ncols);
3507 memcpy (fc->col_offset, rs->col_offset,
3518 fc->cfa_reg = LEB ();
3519 fc->cfa_offset = LEB ();
3520 fc->cfa_exp = 0;
3523 fc->cfa_reg, fc->cfa_offset);
3527 fc->cfa_reg = LEB ();
3528 fc->cfa_exp = 0;
3530 printf (" DW_CFA_def_cfa_reg: r%d\n", fc->cfa_reg);
3534 fc->cfa_offset = LEB ();
3536 printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset);
3552 fc->cfa_exp = 1;
3565 fc->col_type[reg] = DW_CFA_expression;
3578 fc->col_type[reg] = DW_CFA_val_expression;
3585 frame_need_space (fc, reg);
3588 reg, l * fc->data_factor);
3589 fc->col_type[reg] = DW_CFA_offset;
3590 fc->col_offset[reg] = l * fc->data_factor;
3596 frame_need_space (fc, reg);
3599 reg, l * fc->data_factor);
3600 fc->col_type[reg] = DW_CFA_val_offset;
3601 fc->col_offset[reg] = l * fc->data_factor;
3605 fc->cfa_reg = LEB ();
3606 fc->cfa_offset = SLEB ();
3607 fc->cfa_offset = fc->cfa_offset * fc->data_factor;
3608 fc->cfa_exp = 0;
3611 fc->cfa_reg, fc->cfa_offset);
3615 fc->cfa_offset = SLEB ();
3616 fc->cfa_offset = fc->cfa_offset * fc->data_factor;
3618 printf (" DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset);
3624 frame_display_row (fc, &need_col_headers, &max_regs);
3627 ofs * fc->code_factor,
3628 fc->pc_begin + ofs * fc->code_factor);
3629 fc->pc_begin += ofs * fc->code_factor;
3646 frame_need_space (fc, reg);
3649 reg, l * fc->data_factor);
3650 fc->col_type[reg] = DW_CFA_offset;
3651 fc->col_offset[reg] = l * fc->data_factor;
3664 frame_display_row (fc, &need_col_headers, &max_regs);