Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "andrzej zaborowski" <balrogg@gmail.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Disallow pseudo-registers in agent expression.
Date: Sat, 26 Jan 2008 19:15:00 -0000	[thread overview]
Message-ID: <fb249edb0801261110g75922f69o948a2e2fd6b08dfa@mail.gmail.com> (raw)
In-Reply-To: <fb249edb0801261107s6444f842s45ef63860c38f4d3@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 126 bytes --]

On 26/01/2008, andrzej zaborowski <balrogg@gmail.com> wrote:
> Attached is a mailer-unmangled version of the same file:

Oops

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gdb-trace-syn.patch --]
[-- Type: text/x-patch; name=gdb-trace-syn.patch, Size: 1081 bytes --]

2008-01-26  Andrzej Zaborowski  <balrog@zabor.org>
	* ax-gdb.c (gen_expr): Check that register is raw or cooked.
	* tracepoint.c (read_actions): Actions need to be free-able.

diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -1607,6 +1607,8 @@ gen_expr (union exp_element **pc, struct agent_expr *ax,
 	if (reg == -1)
 	  internal_error (__FILE__, __LINE__,
 			  _("Register $%s not available"), name);
+	if (reg >= gdbarch_num_regs (current_gdbarch))
+	  error (_("GDB agent expressions cannot use pseudo-registers."));
 	value->kind = axs_lvalue_register;
 	value->u.reg = reg;
 	value->type = register_type (current_gdbarch, reg);
index 2d744ae..ba57fee 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -862,8 +862,11 @@ read_actions (struct tracepoint *t)
 	line = gdb_readline (0);
 
       if (!line)
-	line = "end";
-      
+	{
+	  line = xstrdup ("end");
+	  printf_filtered ("end\n");
+	}
+
       linetype = validate_actionline (&line, t);
       if (linetype == BADLINE)
 	continue;		/* already warned -- collect another line */

  reply	other threads:[~2008-01-26 19:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26 19:09 andrzej zaborowski
2008-01-26 19:15 ` andrzej zaborowski [this message]
2008-01-27 21:11   ` Jim Blandy
2008-01-29  0:19     ` andrzej zaborowski
2008-01-29  1:49       ` Jim Blandy
2008-02-05 15:34         ` Jim Blandy
2008-02-05 15:58           ` Jim Blandy
2008-02-05 16:07             ` Jim Blandy
2008-02-05 18:23           ` andrzej zaborowski
2008-02-05 19:16             ` Jim Blandy

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=fb249edb0801261110g75922f69o948a2e2fd6b08dfa@mail.gmail.com \
    --to=balrogg@gmail.com \
    --cc=gdb-patches@sources.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