Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 5/5] Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
Date: Wed, 25 Jan 2017 18:27:00 -0000	[thread overview]
Message-ID: <444a7dc6-8af1-8471-db49-596ffe4bd2a9@redhat.com> (raw)
In-Reply-To: <79c06dbccef0c33309d208316be207f4@polymtl.ca>

On 01/24/2017 06:29 PM, Simon Marchi wrote:
> 
>> diff --git a/gdb/guile/scm-disasm.c b/gdb/guile/scm-disasm.c
>> index d06c481..bf3c424 100644
>> --- a/gdb/guile/scm-disasm.c
>> +++ b/gdb/guile/scm-disasm.c
>> @@ -162,7 +162,7 @@ gdbscm_disasm_print_address (bfd_vma addr, struct
>> disassemble_info *info)
>>  static int
>>  gdbscm_print_insn_from_port (struct gdbarch *gdbarch,
>>                   SCM port, ULONGEST offset, CORE_ADDR memaddr,
>> -                 struct ui_file *stream, int *branch_delay_insns)
>> +                 string_file *stream, int *branch_delay_insns)
> 
> Reference instead of pointer?  I don't really mind, it's just that
> you've used references in other places (e.g. the compile code) when
> changing a ui_file pointer to a more specific type.

I failed to notice this comment, sorry.

Yeah, I think I had changed most places, but there will
be places I didn't, mainly to avoid growing the patch too
much with not-that-useful churn.  Here, we have:

static int
gdbscm_print_insn_from_port (struct gdbarch *gdbarch,
			     SCM port, ULONGEST offset, CORE_ADDR memaddr,
			     string_file *stream, int *branch_delay_insns)
{
  struct disassemble_info di;
  int length;
  struct gdbscm_disasm_data data;

  di = gdb_disassemble_info (gdbarch, stream);

and the only use of "stream" in the function is passing
the pointer to gdb_disassemble_info, so I left it be.

grepping the diff for "string_file \*", I get:

+                            string_file *stream, int *branch_delay_insns)
+string_file *
+  return (string_file *) m_streams.back ();
+  string_file *mi_stream = main_stream ();
+  struct string_file *stream = new string_file ();
+  string_file *main_stream ();

Looks like it may have been the only place.

Thanks,
Pedro Alves


  parent reply	other threads:[~2017-01-25 18:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17  1:39 [PATCH 0/5] Eliminate cleanups & make ui_file a C++ " Pedro Alves
2017-01-17  1:39 ` [PATCH 3/5] gdb/stack.c: Remove unused mem_fileopen Pedro Alves
2017-01-17  1:39 ` [PATCH 1/5] gdb: make_scoped_restore and types convertible to T Pedro Alves
2017-01-17  1:39 ` [PATCH 5/5] Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy Pedro Alves
2017-01-17 19:57   ` Simon Marchi
2017-01-17 19:58     ` Simon Marchi
2017-01-23 16:58     ` Pedro Alves
2017-01-23 17:17       ` Pedro Alves
2017-01-23 19:18       ` Simon Marchi
2017-01-23 23:19         ` [PATCH v2 " Pedro Alves
2017-01-24 18:29           ` Simon Marchi
2017-01-24 19:14             ` Simon Marchi
2017-01-25 18:37               ` Pedro Alves
2017-01-25 17:52             ` Pedro Alves
2017-01-25 19:31               ` Pedro Alves
2017-01-25 19:47                 ` [PATCH v3 " Pedro Alves
2017-02-01  0:31                   ` Pedro Alves
2017-01-25 18:27             ` Pedro Alves [this message]
2017-01-24 19:11           ` [PATCH v2 " Simon Marchi
2017-01-25 18:28             ` Pedro Alves
2017-01-25 18:39               ` Simon Marchi
2017-01-25 18:41                 ` Pedro Alves
2017-01-17  1:39 ` [PATCH 2/5] gdb/varobj.c: Fix leak Pedro Alves
2017-01-17  1:47 ` [PATCH 4/5] gdb/mi/mi-interp.c: Fix typos Pedro Alves

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=444a7dc6-8af1-8471-db49-596ffe4bd2a9@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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