public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org, Jason Merrill <jason@redhat.com>,
	       Tom Tromey <tromey@redhat.com>,
	Jan Kratochvil <jkratoch@redhat.com>,
	       Cary Coutant <ccoutant@google.com>,
	Mark Wielaard <mjw@redhat.com>
Subject: Re: [RFC] More compact (100x) -g3 .debug_macinfo (take 2)
Date: Fri, 15 Jul 2011 17:19:00 -0000	[thread overview]
Message-ID: <4E206952.8000601@redhat.com> (raw)
In-Reply-To: <20110715154223.GM2687@tyan-ft48-01.lab.bos.redhat.com>

On 07/15/2011 08:42 AM, Jakub Jelinek wrote:

> The newly added opcodes:
> DW_MACINFO_GNU_define_indirect		0xe0
> 	This opcode has two arguments, one is uleb128 lineno and the
> 	other is offset size long byte offset into .debug_str.  Except
> 	for the encoding of the string it is similar to DW_MACINFO_define.
> DW_MACINFO_GNU_undef_indirect		0xe1
> 	This opcode has two arguments, one is uleb128 lineno and the
> 	other is offset size long byte offset into .debug_str.  Except
> 	for the encoding of the string it is similar to DW_MACINFO_undef.
> DW_MACINFO_GNU_transparent_include	0xe2
> 	This opcode has a single argument, a offset size long byte offset into
> 	.debug_macinfo.  It instructs the debug info consumer that
> 	this opcode during reading should be replaced with the sequence
> 	of .debug_macinfo opcodes from the mentioned offset, up to
> 	a terminating 0 opcode (not including that 0).
> DW_MACINFO_GNU_define_opcode		0xe3
> 	This is an opcode for future extensibility through which
> 	a debugger could skip unknown opcodes.  It has 3 arguments:
> 	1 byte opcode number, uleb128 count of arguments and
> 	a count bytes long array, with a DW_FORM_* code how the
> 	argument is encoded.

I do like the new opcodes.

Elsewhere you described transparent_include as also saving state
about defined opcodes around the include.  Do you want to either
describe that or drop it?



> +	case DW_MACINFO_define:
> +	case DW_MACINFO_undef:
> +#ifdef OBJECT_FORMAT_ELF
> +	  if (!dwarf_strict
> +	      && HAVE_COMDAT_GROUP
> +	      && VEC_length (macinfo_entry, files) != 1
> +	      && i > 0
> +	      && i + 1 < length
> +	      && VEC_index (macinfo_entry, macinfo_table, i - 1)->code == 0)
> +	    {
> +	      char linebuf[sizeof (HOST_WIDE_INT) * 3 + 1];
> +	      unsigned char checksum[16];
> +	      struct md5_ctx ctx;

I'd like to see this broken out into some functions, and avoid
as much code as possible within ifdefs.  Perhaps

some_function (...)
{
#ifndef OBJECT_FORMAT_ELF
  return;
#endif
  // everything else
}

I think it also doesn't help review that there are no comments
at all, and a preponderance of description-less variable names
like "ref" and "ref2".


r~

  reply	other threads:[~2011-07-15 16:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13 17:12 [RFC] More compact (100x) -g3 .debug_macinfo Jakub Jelinek
2011-07-13 19:59 ` Tom Tromey
2011-07-13 20:37   ` Jakub Jelinek
2011-07-18 15:42     ` Tom Tromey
2011-07-15 15:52 ` [RFC] More compact (100x) -g3 .debug_macinfo (take 2) Jakub Jelinek
2011-07-15 17:19   ` Richard Henderson [this message]
2011-07-15 21:18     ` [RFC] More compact (100x) -g3 .debug_macinfo (take 3) Jakub Jelinek
2011-07-18 15:09       ` Tom Tromey
2011-07-20  1:17       ` Richard Henderson
2011-07-21 11:38         ` [RFC] More compact (100x) -g3 .debug_gnu_macro (take 4) Jakub Jelinek
2011-07-21 17:25           ` Richard Henderson
2011-07-21 18:13             ` Jakub Jelinek
2011-07-22 13:49             ` [RFC] More compact (100x) -g3 .debug_gnu_macro (take 5) Jakub Jelinek
2011-07-22 15:34               ` Tom Tromey
2011-07-22 17:24               ` Richard Henderson
2011-07-22 20:33             ` [RFC] More compact (100x) -g3 .debug_gnu_macro (take 4) Michael Eager
2011-07-22 21:50               ` Richard Henderson
2011-07-22 21:51                 ` Michael Eager
2011-07-22 22:10                   ` Richard Henderson
2011-07-23  0:32                     ` Michael Eager
2011-07-23  0:36                       ` Richard Henderson
2011-07-26  7:34                         ` Jason Merrill
2011-07-15 18:28   ` [RFC] More compact (100x) -g3 .debug_macinfo (take 2) Tom Tromey
2011-07-15 19:21     ` Jakub Jelinek
2011-07-15 19:30       ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E206952.8000601@redhat.com \
    --to=rth@redhat.com \
    --cc=ccoutant@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=jkratoch@redhat.com \
    --cc=mjw@redhat.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).