Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Adrian Sendroiu <adrian.sendroiu@freescale.com>,
	       gdb-patches@sourceware.org
Subject: Re: [PATCH] call observer_notify_new_objfile after the attach command
Date: Thu, 10 Jul 2014 13:53:00 -0000	[thread overview]
Message-ID: <53BE9ABD.7020608@redhat.com> (raw)
In-Reply-To: <1404989787-18250-1-git-send-email-adrian.sendroiu@freescale.com>

Thanks.

Could you complete the patch according to the instructions
at https://sourceware.org/gdb/wiki/ContributionChecklist, so it
could be git am'ed/pushed?  (explain the rationale in the commit
log, ChangeLog, etc.)

Adding a comment in extended_remote_post_attach explaining why
that is done there would be good too.  E.g., mention the case
of no libraries and the program not changing.

Please also add something like this above the new function:

/* Implementation of the to_post_attach method.  */


And, write an explicit NULL check:

  if (symfile_objfile != NULL)

Thanks again,
-- 
Pedro Alves

On 07/10/2014 11:56 AM, Adrian Sendroiu wrote:
> Thanks, I added a call to remote_check_symbols in the post_attach hook.
> 
> Adrian
> 
> From 0820f5ab475bd9e261e7be26dabbd30e5df60544 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Adrian=20=C8=98endroiu?= <adrian.sendroiu@freescale.com>
> Date: Thu, 10 Jul 2014 11:16:41 +0300
> Subject: [PATCH] call remote_check_symbols after attaching
> 
> ---
>  gdb/remote.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/gdb/remote.c b/gdb/remote.c
> index 3aa030c..8b438c7 100644
> --- a/gdb/remote.c
> +++ b/gdb/remote.c
> @@ -4484,6 +4484,13 @@ extended_remote_attach (struct target_ops *ops, const char *args, int from_tty)
>    extended_remote_attach_1 (ops, args, from_tty);
>  }
>  
> +static void
> +extended_remote_post_attach (struct target_ops *ops, int pid)
> +{
> +  if (symfile_objfile)
> +    remote_check_symbols();
> +}
> +
>  \f
>  /* Check for the availability of vCont.  This function should also check
>     the response.  */
> @@ -11530,6 +11537,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
>    extended_remote_ops.to_mourn_inferior = extended_remote_mourn;
>    extended_remote_ops.to_detach = extended_remote_detach;
>    extended_remote_ops.to_attach = extended_remote_attach;
> +  extended_remote_ops.to_post_attach = extended_remote_post_attach;
>    extended_remote_ops.to_kill = extended_remote_kill;
>    extended_remote_ops.to_supports_disable_randomization
>      = extended_remote_supports_disable_randomization;
> 



      reply	other threads:[~2014-07-10 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 13:51 Adrian Sendroiu
2014-07-09 14:18 ` Pedro Alves
2014-07-10 10:57   ` Adrian Sendroiu
2014-07-10 13:53     ` Pedro Alves [this message]

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=53BE9ABD.7020608@redhat.com \
    --to=palves@redhat.com \
    --cc=adrian.sendroiu@freescale.com \
    --cc=gdb-patches@sourceware.org \
    /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