This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma


Same with the issue

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

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?


2010-11-03  Hui Zhu  <>

	* 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)

       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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]