Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Stan Shebs <stan@codesourcery.com>
Subject: Re: [PATCH] More C++ for tracepoint actions
Date: Fri, 12 Mar 2010 01:27:00 -0000	[thread overview]
Message-ID: <201003120127.40475.pedro@codesourcery.com> (raw)
In-Reply-To: <4B999376.8030209@codesourcery.com>

I got comments :-)

On Friday 12 March 2010 01:05:58, Stan Shebs wrote:
> + static int
> + gen_maybe_namespace_elt (struct expression *exp,
> +                        struct agent_expr *ax, struct axs_value *value,
> +                        const struct type *curtype, char *name)
> + {
> +   const char *namespace_name = TYPE_TAG_NAME (curtype);
> +   struct symbol *sym;
> + 
> +   sym = cp_lookup_symbol_namespace (namespace_name, name,
> +                                   get_selected_block (0), 

This should be context of the tracepoint instead:

  block_for_pc (ax->scope)

The selected frame is unrelated to the tracepoint location.
Basically, every call to get_selected_frame or
get_selected_block in byte code generation is a bug.

E.g. to make this clear for the archives: when stopped
at `main', with frame #0 selected, get_selected_block
returns the block of function `main'.  If you do
`trace foo; actions ...; tstart', you want to use the context
of `foo' to generate the bytecode of this tracepoint, not `main'.

-- 
Pedro Alves


  reply	other threads:[~2010-03-12  1:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12  1:06 Stan Shebs
2010-03-12  1:27 ` Pedro Alves [this message]
2010-03-16  0:05   ` Stan Shebs

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=201003120127.40475.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=stan@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