Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Sanjoy Das <sanjoy@playingwithpointers.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 5/7] Use the loaded reader.
Date: Tue, 30 Aug 2011 19:18:00 -0000	[thread overview]
Message-ID: <m3sjoiaeua.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1314518609-10204-6-git-send-email-sanjoy@playingwithpointers.com>	(Sanjoy Das's message of "Sun, 28 Aug 2011 13:33:27 +0530")

>>>>> "Sanjoy" == Sanjoy Das <sanjoy@playingwithpointers.com> writes:

Sanjoy> 	* gdb/jit.c: Include block.h, dictionary.h and frame-unwind.h.
Sanjoy> 	(add_objfile_entry, jit_target_read_impl, jit_object_open_impl)
Sanjoy> 	(jit_symtab_open_impl, compare_block, jit_block_open_impl)
Sanjoy> 	(jit_symtab_line_mapping_add_impl, jit_symtab_close_impl)
Sanjoy> 	(finalize_symtab, jit_object_close_impl)
Sanjoy> 	(jit_reader_try_read_symtab, jit_bfd_try_read_symtab)
Sanjoy> 	(free_objfile_data): New functions.
Sanjoy> 	(_initialize_jit): Register jit_objfile_data with a proper cleanup
Sanjoy> 	function.

Just some minor nits on this one.

Sanjoy> +  for (i = 0; i < nlines; i++)
Sanjoy> +    {
Sanjoy> +      stab->linetable->item [i].pc = (CORE_ADDR) map[i].pc;
Sanjoy> +      stab->linetable->item [i].line = map[i].line;
Sanjoy> +    }

No space before the "[" on those two lines.

Sanjoy> +  for (i = (actual_nblocks - 1), gdb_block_iter = stab->blocks;
Sanjoy> +       i >= FIRST_LOCAL_BLOCK; i--, gdb_block_iter = gdb_block_iter->next)

Once a 'for' header goes to a second line, I like to put each clause on
its own line, since I think that is easier to read.  So, add a newline
after the second ";".

Sanjoy> +  /* Fill up the superblock fields for the real blocks, using the
Sanjoy> +     real_block fields populated earlier.  */
Sanjoy> +  for (gdb_block_iter = stab->blocks; gdb_block_iter;
Sanjoy> +       gdb_block_iter = gdb_block_iter->next)

Likewise.

Sanjoy> +  for (gdb_block_iter = stab->blocks, gdb_block_iter_tmp = gdb_block_iter->next;
Sanjoy> +       gdb_block_iter; gdb_block_iter = gdb_block_iter_tmp)

Likewise.

Sanjoy> +  objfile->msymbols[0].ginfo.name = NULL;
Sanjoy> +  objfile->msymbols[0].ginfo.value.address = 0;

I think it is slightly better to use memset here.

Sanjoy> -  jit_objfile_data = register_objfile_data ();
Sanjoy> +  jit_objfile_data =
Sanjoy> +    register_objfile_data_with_cleanup (NULL,free_objfile_data);

Missing space after the ",".

This is ok with these things fixed.

Tom


  reply	other threads:[~2011-08-30 19:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27 13:08 JIT Debug Info Reader Sanjoy Das
2011-08-27 13:08 ` [PATCH 6/7] New JIT unwinder Sanjoy Das
2011-08-28  2:17   ` Sergio Durigan Junior
     [not found]   ` <1314518609-10204-1-git-send-email-sanjoy@playingwithpointers.com>
2011-08-28  8:04     ` [PATCH 7/7] Documentation Sanjoy Das
2011-08-30 19:43       ` Tom Tromey
2011-08-28  8:04     ` [PATCH 5/7] Use the loaded reader Sanjoy Das
2011-08-30 19:18       ` Tom Tromey [this message]
2011-08-28  8:04     ` [PATCH 4/7] New commands for loading and unloading a reader Sanjoy Das
2011-08-30 18:52       ` Tom Tromey
2011-08-28  8:04     ` [PATCH 3/7] Platform agnostic dynamic loading code Sanjoy Das
2011-08-28  8:04     ` [PATCH 6/7] New JIT unwinder Sanjoy Das
2011-08-30 19:28       ` Tom Tromey
2011-08-28  8:05     ` [PATCH 2/7] Relocatable directory for loading JIT readers Sanjoy Das
2011-08-30 18:32       ` Tom Tromey
2011-08-28  8:07     ` [PATCH 1/7] Introduce jit-reader.in and modify build system Sanjoy Das
2011-08-30 18:30       ` Tom Tromey
2011-08-31  3:16         ` Sanjoy Das
2011-08-31 17:44           ` Tom Tromey
2011-08-27 13:08 ` [PATCH 4/7] New commands for loading and unloading a reader Sanjoy Das
2011-08-27 14:51   ` Abhijit Halder
2011-08-27 13:08 ` [PATCH 5/7] Use the loaded reader Sanjoy Das
2011-08-27 13:47   ` Abhijit Halder
2011-08-27 14:18     ` Abhijit Halder
2011-08-27 13:08 ` [PATCH 3/7] Platform agnostic dynamic loading code Sanjoy Das
2011-08-27 13:08 ` [PATCH 2/7] Relocatable directory for loading JIT readers Sanjoy Das
2011-08-27 13:08 ` [PATCH 7/7] Documentation Sanjoy Das
2011-08-27 13:08 ` [PATCH 1/7] Introduce jit-reader.in and modify build system Sanjoy Das
  -- strict thread matches above, loose matches on Subject: below --
2011-08-31  3:31 JIT Reader (re-roll) Sanjoy Das
2011-08-31  3:32 ` [PATCH 5/7] Use the loaded reader Sanjoy Das
2011-08-24 18:57 JIT Debug Info Reader (re-roll) Sanjoy Das
2011-08-24 18:57 ` [PATCH 5/7] Use the loaded reader Sanjoy Das

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=m3sjoiaeua.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sanjoy@playingwithpointers.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