public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, Phil Muldoon <pmuldoon@redhat.com>
Subject: Re: [PATCH v4 11/11] RFC only: compile: Use also inferior munmap
Date: Wed, 06 May 2015 19:32:00 -0000	[thread overview]
Message-ID: <20150506193208.GA18439@host1.jankratochvil.net> (raw)
In-Reply-To: <554A3181.9040903@redhat.com>

On Wed, 06 May 2015 17:21:37 +0200, Pedro Alves wrote:
> On 05/03/2015 03:08 PM, Jan Kratochvil wrote:
> > I believe later patches will be needed to introduce full control over keeping
> > vs. discarding the injected module as being discussed in:
> > 	compile: objfiles lifetime UI
> > 	https://sourceware.org/ml/gdb/2015-04/msg00051.html
> > 	Message-ID: <20150429135735.GA16974@host1.jankratochvil.net>
> > This patch at least introduces code which will be needed for the part/cases of
> > really freeing all the resources of an injected module.
> > 
> > It is "RFC only" as given the patch as is it regresses GDB functionality.
> 
> I don't which parts of this would cause regressions;

For example the existing testsuite case - without its change it would
PASS->FAIL.


> it's helpful
> when an RFC points out what is known to be hacky or patch bits that are known
> to need to change.  It's not obvious, at least to me.

One can imagine many cases when the inferior can later reference the injected
object's memory; although I agree for most of the 'print' expressions it will
not happen.  Maybe only the C 'char *' case
	https://sourceware.org/ml/gdb/2015-04/msg00054.html
is the most visible one, C++ has better memory ownership/management in its
objects.


> That said, I skimmed it and it overall looks good.  The stop_registers
> bits looked surprising.  My reaction was that I'd think that would be
> something handled around save_infcall_suspend_state/restore_infcall_suspend_state,
> though it's not clear to me.

This was a minimal change how to make this patch working.  I agree
'stop_registers' (also) looks as a hack to me, I will therefore try to make
some pre/post cleanup patch if we can get rid of 'stop_registers', I have no
idea.


Thanks,
Jan

  reply	other threads:[~2015-05-06 19:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-03 14:06 [PATCH v4 00/11] compile: compile print&printf Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 05/11] compile: Support relocation to GNU-IFUNCs Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 08/11] compile: New 'compile print' Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 02/11] Code cleanup: Make parts of print_command_1 public Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 04/11] Code cleanup: compile: Constify some parameters Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 06/11] compile: Use -Wall, not -w Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 01/11] compile: Add one debug message Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 07/11] Code cleanup: compile: func_addr -> func_sym Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 03/11] compile: Distribute scope, add scope_data Jan Kratochvil
2015-05-03 14:08 ` [PATCH v4 10/11] compile: compile printf: gdbserver support Jan Kratochvil
2015-05-03 14:08 ` [PATCH v4 11/11] RFC only: compile: Use also inferior munmap Jan Kratochvil
2015-05-06 15:21   ` Pedro Alves
2015-05-06 19:32     ` Jan Kratochvil [this message]
2015-05-08 20:23       ` Jan Kratochvil
2015-05-03 14:08 ` [PATCH v4 09/11] compile: New compile printf Jan Kratochvil

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=20150506193208.GA18439@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=pmuldoon@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).