From: Pedro Alves <pedro@codesourcery.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: gdb-patches@sourceware.org, Yao Qi <yao@codesourcery.com>
Subject: Re: [patch] Fix leak of bp_jit_event breakpoints
Date: Fri, 28 Jan 2011 01:27:00 -0000 [thread overview]
Message-ID: <201101272259.02058.pedro@codesourcery.com> (raw)
In-Reply-To: <AANLkTikvzfONKwhRh9mZYw+pj5KqB6FhExO_amoDnFpz@mail.gmail.com>
On Thursday 27 January 2011 21:50:35, Paul Pluzhnikov wrote:
> -/* This is the address of the JIT descriptor in the inferior. */
> -
> -static CORE_ADDR jit_descriptor_addr = 0;
...
> +struct jit_inferior_data
> +{
> + CORE_ADDR breakpoint_addr;
> + CORE_ADDR descriptor_addr;
> +};
You've lost the comment above. It'd be nice to
have this structure and its fields documented..
> > But
> > if you want to come up with other solutions, I'd be happy
> > to consider them. I'm thinking that we should delete the
> > jit breakpoint (and perhaps more) whenever the executable
> > changes (say, the "file" command), which is kind of
> > a similar case of an "exec", so maybe we should install
> > an executable_changed observer as well. Not sure that
> > covers all we need.
>
> I think this is covered now -- after "file", if we attach or run,
> inferior_create_observer will delete the old breakpoint.
The other way around isn't. If e.g., you attach to a process,
and notice that the exec is wrongly set --- and then use "file"
command to fix it. We'd set a new jit breakpoint before, but
we don't now --- I think we should reset the jit state in that
case, at least like jit_inferior_created_observer is
doing, and that's what I was thinking could be done
from the executable_changed observer.
Other than that, the patch looks okay.
--
Pedro Alves
next prev parent reply other threads:[~2011-01-27 22:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 20:49 Paul Pluzhnikov
2011-01-19 21:14 ` Pedro Alves
2011-01-20 7:17 ` Paul Pluzhnikov
2011-01-21 1:11 ` Paul Pluzhnikov
2011-01-26 19:48 ` Paul Pluzhnikov
2011-01-27 14:15 ` Pedro Alves
2011-01-27 22:59 ` Paul Pluzhnikov
2011-01-28 1:27 ` Pedro Alves [this message]
2011-01-28 18:02 ` Paul Pluzhnikov
2011-01-28 20:38 ` Pedro Alves
2011-01-31 22:00 ` Paul Pluzhnikov
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=201101272259.02058.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=ppluzhnikov@google.com \
--cc=yao@codesourcery.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).