This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma
- From: Hui Zhu <teawater at gmail dot com>
- To: gdb-patches ml <gdb-patches at sourceware dot org>
- Cc: Pedro Alves <pedro at codesourcery dot com>, Joel Brobecker <brobecker at adacore dot com>
- Date: Wed, 3 Nov 2010 13:39:03 +0800
- Subject: [PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma
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);
}