From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Cc: Phil Muldoon <pmuldoon@redhat.com>
Subject: Re: [PATCH v4 11/11] RFC only: compile: Use also inferior munmap
Date: Wed, 06 May 2015 15:21:00 -0000 [thread overview]
Message-ID: <554A3181.9040903@redhat.com> (raw)
In-Reply-To: <20150503140815.18583.29612.stgit@host1.jankratochvil.net>
On 05/03/2015 03:08 PM, Jan Kratochvil wrote:
> Hi,
>
> currently inferior memory is allocated by inferior mmap() but it is never
> deallocated; despite the injected objfile incl. its symbols is freed. This was
> intentional so that one can do for example:
> inferior:
> char *str = "foo";
> GDB:
> (gdb) compile code str = "bar";
>
> 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; 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.
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.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-05-06 15:21 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 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 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 05/11] compile: Support relocation to GNU-IFUNCs Jan Kratochvil
2015-05-03 14:07 ` [PATCH v4 03/11] compile: Distribute scope, add scope_data 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 01/11] compile: Add one debug message 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 [this message]
2015-05-06 19:32 ` Jan Kratochvil
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=554A3181.9040903@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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).