Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Cc: Pedro Alves <pedro@codesourcery.com>,
	Joel Brobecker <brobecker@adacore.com>
Subject: [PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma
Date: Wed, 03 Nov 2010 05:39:00 -0000	[thread overview]
Message-ID: <AANLkTikZNwoNNOa+FJPCwc3ZpU1T0qe9t8ccOqcWmsA1@mail.gmail.com> (raw)

Hello,

Same with the issue http://sourceware.org/ml/gdb-patches/2010-10/msg00403.html

remote_trace_set_readonly_regions send lma to gdbserver as the readonly part.
But Linux kernel vmlinux's vma is different from lma, and it running
in vma address.  So it m command work not very well after tfind.
Also you can see https://code.google.com/p/kgtp/issues/detail?id=1

So I make a patch change lma to vma in remote_trace_set_readonly_regions.

Do you think 7.2.1 need this patch too?

Thanks,
Hui

2010-11-03  Hui Zhu  <teawater@gmail.com>

	* tracepoint.c (remote_trace_set_readonly_regions): Change lma to vma.
---
 remote.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/remote.c
+++ b/remote.c
@@ -9878,7 +9878,7 @@ remote_trace_set_readonly_regions (void)
 {
   asection *s;
   bfd_size_type size;
-  bfd_vma lma;
+  bfd_vma vma;
   int anysecs = 0;

   if (!exec_bfd)
@@ -9895,10 +9895,10 @@ remote_trace_set_readonly_regions (void)
 	continue;

       anysecs = 1;
-      lma = s->lma;
+      vma = s->vma;
       size = bfd_get_section_size (s);
-      sprintf_vma (tmp1, lma);
-      sprintf_vma (tmp2, lma + size);
+      sprintf_vma (tmp1, vma);
+      sprintf_vma (tmp2, vma + size);
       sprintf (target_buf + strlen (target_buf),
 	       ":%s,%s", tmp1, tmp2);
     }


             reply	other threads:[~2010-11-03  5:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03  5:39 Hui Zhu [this message]
2010-11-03 10:05 ` Pedro Alves
2010-11-04  5:02   ` Hui Zhu

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=AANLkTikZNwoNNOa+FJPCwc3ZpU1T0qe9t8ccOqcWmsA1@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@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