* [PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma
@ 2010-11-03 5:39 Hui Zhu
2010-11-03 10:05 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Hui Zhu @ 2010-11-03 5:39 UTC (permalink / raw)
To: gdb-patches ml; +Cc: Pedro Alves, Joel Brobecker
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);
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma
2010-11-03 5:39 [PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma Hui Zhu
@ 2010-11-03 10:05 ` Pedro Alves
2010-11-04 5:02 ` Hui Zhu
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2010-11-03 10:05 UTC (permalink / raw)
To: gdb-patches; +Cc: Hui Zhu, Joel Brobecker
On Wednesday 03 November 2010 05:39:03, Hui Zhu wrote:
> @@ -9895,10 +9895,10 @@ remote_trace_set_readonly_regions (void)
> continue;
>
> anysecs = 1;
> - lma = s->lma;
> + vma = s->vma;
Okay, but while you're at it, use bfd_get_section_vma instead.
> Do you think 7.2.1 need this patch too?
Yes.
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma
2010-11-03 10:05 ` Pedro Alves
@ 2010-11-04 5:02 ` Hui Zhu
0 siblings, 0 replies; 3+ messages in thread
From: Hui Zhu @ 2010-11-04 5:02 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, Joel Brobecker
Fix and checked in.
Thanks,
Hui
On Wed, Nov 3, 2010 at 18:05, Pedro Alves <pedro@codesourcery.com> wrote:
> On Wednesday 03 November 2010 05:39:03, Hui Zhu wrote:
>
>> @@ -9895,10 +9895,10 @@ remote_trace_set_readonly_regions (void)
>> continue;
>>
>> anysecs = 1;
>> - lma = s->lma;
>> + vma = s->vma;
>
> Okay, but while you're at it, use bfd_get_section_vma instead.
>
>> Do you think 7.2.1 need this patch too?
>
> Yes.
>
> --
> Pedro Alves
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-04 5:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-03 5:39 [PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma Hui Zhu
2010-11-03 10:05 ` Pedro Alves
2010-11-04 5:02 ` Hui Zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox