PATCH: Add some dwarf3 support to readelf
H . J . Lu
hjl@lucon.org
Mon Jun 3 09:06:00 GMT 2002
More information about the Binutils mailing list
Mon Jun 3 09:06:00 GMT 2002
- Previous message (by thread): [PATCH] SH :undefined reference to `___EH_FRAME_BEGIN__' for COFF and HMS
- Next message (by thread): PATCH: Add some dwarf3 support to readelf
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Here is a patch for readelf to support some dwarf3 output from gcc 3.1.1. I don't know how to handle DW_CFA_def_cfa_expression nor DW_CFA_expression. Could someone please take a look at this? Thanks. H.J. ---- 2002-06-03 H.J. Lu <hjl@gnu.org> * readelf.c (DW_CFA_GNU_args_size): Don't define. (DW_CFA_GNU_negative_offset_extended): Likewise. (DW_CFA_GNU_window_save): Likewise. (display_debug_frames): Handle DW_CFA_offset_extended_sf, DW_CFA_def_cfa_sf and DW_CFA_def_cfa_offset_sf. --- binutils/readelf.c.dwarf3 Thu May 23 08:22:25 2002 +++ binutils/readelf.c Mon Jun 3 09:00:06 2002 @@ -8461,15 +8461,20 @@ display_debug_frames (section, start, fi case DW_CFA_def_cfa_offset: LEB (); break; -#ifndef DW_CFA_GNU_args_size -#define DW_CFA_GNU_args_size 0x2e -#endif + case DW_CFA_offset_extended_sf: + reg = LEB (); SLEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_def_cfa_sf: + LEB (); SLEB (); + break; + case DW_CFA_def_cfa_offset_sf: + SLEB (); + break; case DW_CFA_GNU_args_size: LEB (); break; -#ifndef DW_CFA_GNU_negative_offset_extended -#define DW_CFA_GNU_negative_offset_extended 0x2f -#endif case DW_CFA_GNU_negative_offset_extended: reg = LEB (); LEB (); frame_need_space (fc, reg); @@ -8664,9 +8669,31 @@ display_debug_frames (section, start, fi printf (" DW_CFA_nop\n"); break; -#ifndef DW_CFA_GNU_window_save -#define DW_CFA_GNU_window_save 0x2d -#endif + case DW_CFA_offset_extended_sf: + reg = LEB (); + l = SLEB (); + frame_need_space (fc, reg); + if (! do_debug_frames_interp) + printf (" DW_CFA_offset_extended_sf: r%ld at cfa%+ld\n", + reg, l * fc->data_factor); + fc->col_type[reg] = DW_CFA_offset; + fc->col_offset[reg] = l * fc->data_factor; + break; + + case DW_CFA_def_cfa_sf: + fc->cfa_reg = LEB (); + fc->cfa_offset = SLEB (); + if (! do_debug_frames_interp) + printf (" DW_CFA_def_cfa_sf: r%d ofs %d\n", + fc->cfa_reg, fc->cfa_offset); + break; + + case DW_CFA_def_cfa_offset_sf: + fc->cfa_offset = SLEB (); + if (! do_debug_frames_interp) + printf (" DW_CFA_def_cfa_offset_sf: %d\n", fc->cfa_offset); + break; + case DW_CFA_GNU_window_save: if (! do_debug_frames_interp) printf (" DW_CFA_GNU_window_save\n");
- Previous message (by thread): [PATCH] SH :undefined reference to `___EH_FRAME_BEGIN__' for COFF and HMS
- Next message (by thread): PATCH: Add some dwarf3 support to readelf
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list