* [patch] readelf: decode DW_LNE_HP_source_file_correlation
@ 2011-04-19 12:10 Tristan Gingold
2011-04-26 7:44 ` Ping " Tristan Gingold
2011-04-26 23:34 ` Alan Modra
0 siblings, 2 replies; 4+ messages in thread
From: Tristan Gingold @ 2011-04-19 12:10 UTC (permalink / raw)
To: binutils
Hi,
HP has defined a few DW_LNE_ opcodes for source file correlation (mostly for backward
compatible stuff). This patch displays them.
No regression on i386-linux.
Ok for trunk ?
Tristan.
binutils/
2011-04-19 Tristan Gingold <gingold@adacore.com>
* dwarf.c (process_extended_line_op): Handle
DW_LNE_HP_source_file_correlation.
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 8846e87..cc85525 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -324,6 +324,53 @@ process_extended_line_op (unsigned char *data, int is_stmt)
case DW_LNE_HP_define_proc:
printf ("DW_LNE_HP_define_proc\n");
break;
+ case DW_LNE_HP_source_file_correlation:
+ {
+ unsigned char *edata = data + len - bytes_read - 1;
+
+ printf ("DW_LNE_HP_source_file_correlation\n");
+
+ while (data < edata)
+ {
+ unsigned int opc;
+
+ opc = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+
+ switch (opc)
+ {
+ case DW_LNE_HP_SFC_formfeed:
+ printf (" DW_LNE_HP_SFC_formfeed\n");
+ break;
+ case DW_LNE_HP_SFC_set_listing_line:
+ printf (" DW_LNE_HP_SFC_set_listing_line (%s)\n",
+ dwarf_vmatoa ("u",
+ read_leb128 (data, & bytes_read, 0)));
+ data += bytes_read;
+ break;
+ case DW_LNE_HP_SFC_associate:
+ printf (" DW_LNE_HP_SFC_associate ");
+ printf (_("(%s"),
+ dwarf_vmatoa ("u",
+ read_leb128 (data, & bytes_read, 0)));
+ data += bytes_read;
+ printf (_(",%s"),
+ dwarf_vmatoa ("u",
+ read_leb128 (data, & bytes_read, 0)));
+ data += bytes_read;
+ printf (_(",%s)\n"),
+ dwarf_vmatoa ("u",
+ read_leb128 (data, & bytes_read, 0)));
+ data += bytes_read;
+ break;
+ default:
+ printf (" UNKNOW DW_LNE_HP_SFC opcode (%u)\n", opc);
+ data = edata;
+ break;
+ }
+ }
+ }
+ break;
default:
if (op_code >= DW_LNE_lo_user
^ permalink raw reply [flat|nested] 4+ messages in thread
* Ping [patch] readelf: decode DW_LNE_HP_source_file_correlation
2011-04-19 12:10 [patch] readelf: decode DW_LNE_HP_source_file_correlation Tristan Gingold
@ 2011-04-26 7:44 ` Tristan Gingold
2011-04-26 23:34 ` Alan Modra
1 sibling, 0 replies; 4+ messages in thread
From: Tristan Gingold @ 2011-04-26 7:44 UTC (permalink / raw)
To: binutils
Ping for:
On Apr 19, 2011, at 2:10 PM, Tristan Gingold wrote:
> Hi,
>
> HP has defined a few DW_LNE_ opcodes for source file correlation (mostly for backward
> compatible stuff). This patch displays them.
>
> No regression on i386-linux.
> Ok for trunk ?
>
> Tristan.
>
> binutils/
> 2011-04-19 Tristan Gingold <gingold@adacore.com>
>
> * dwarf.c (process_extended_line_op): Handle
> DW_LNE_HP_source_file_correlation.
>
> diff --git a/binutils/dwarf.c b/binutils/dwarf.c
> index 8846e87..cc85525 100644
> --- a/binutils/dwarf.c
> +++ b/binutils/dwarf.c
> @@ -324,6 +324,53 @@ process_extended_line_op (unsigned char *data, int is_stmt)
> case DW_LNE_HP_define_proc:
> printf ("DW_LNE_HP_define_proc\n");
> break;
> + case DW_LNE_HP_source_file_correlation:
> + {
> + unsigned char *edata = data + len - bytes_read - 1;
> +
> + printf ("DW_LNE_HP_source_file_correlation\n");
> +
> + while (data < edata)
> + {
> + unsigned int opc;
> +
> + opc = read_leb128 (data, & bytes_read, 0);
> + data += bytes_read;
> +
> + switch (opc)
> + {
> + case DW_LNE_HP_SFC_formfeed:
> + printf (" DW_LNE_HP_SFC_formfeed\n");
> + break;
> + case DW_LNE_HP_SFC_set_listing_line:
> + printf (" DW_LNE_HP_SFC_set_listing_line (%s)\n",
> + dwarf_vmatoa ("u",
> + read_leb128 (data, & bytes_read, 0)));
> + data += bytes_read;
> + break;
> + case DW_LNE_HP_SFC_associate:
> + printf (" DW_LNE_HP_SFC_associate ");
> + printf (_("(%s"),
> + dwarf_vmatoa ("u",
> + read_leb128 (data, & bytes_read, 0)));
> + data += bytes_read;
> + printf (_(",%s"),
> + dwarf_vmatoa ("u",
> + read_leb128 (data, & bytes_read, 0)));
> + data += bytes_read;
> + printf (_(",%s)\n"),
> + dwarf_vmatoa ("u",
> + read_leb128 (data, & bytes_read, 0)));
> + data += bytes_read;
> + break;
> + default:
> + printf (" UNKNOW DW_LNE_HP_SFC opcode (%u)\n", opc);
> + data = edata;
> + break;
> + }
> + }
> + }
> + break;
>
> default:
> if (op_code >= DW_LNE_lo_user
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] readelf: decode DW_LNE_HP_source_file_correlation
2011-04-19 12:10 [patch] readelf: decode DW_LNE_HP_source_file_correlation Tristan Gingold
2011-04-26 7:44 ` Ping " Tristan Gingold
@ 2011-04-26 23:34 ` Alan Modra
2011-04-27 12:13 ` Tristan Gingold
1 sibling, 1 reply; 4+ messages in thread
From: Alan Modra @ 2011-04-26 23:34 UTC (permalink / raw)
To: Tristan Gingold; +Cc: binutils
On Tue, Apr 19, 2011 at 02:10:34PM +0200, Tristan Gingold wrote:
> * dwarf.c (process_extended_line_op): Handle
> DW_LNE_HP_source_file_correlation.
OK.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] readelf: decode DW_LNE_HP_source_file_correlation
2011-04-26 23:34 ` Alan Modra
@ 2011-04-27 12:13 ` Tristan Gingold
0 siblings, 0 replies; 4+ messages in thread
From: Tristan Gingold @ 2011-04-27 12:13 UTC (permalink / raw)
To: Alan Modra; +Cc: binutils
On Apr 27, 2011, at 1:34 AM, Alan Modra wrote:
> On Tue, Apr 19, 2011 at 02:10:34PM +0200, Tristan Gingold wrote:
>> * dwarf.c (process_extended_line_op): Handle
>> DW_LNE_HP_source_file_correlation.
>
> OK.
Committed.
Tristan.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-27 12:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-19 12:10 [patch] readelf: decode DW_LNE_HP_source_file_correlation Tristan Gingold
2011-04-26 7:44 ` Ping " Tristan Gingold
2011-04-26 23:34 ` Alan Modra
2011-04-27 12:13 ` Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).