From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10493 invoked by alias); 3 Nov 2010 05:39:34 -0000 Received: (qmail 10292 invoked by uid 22791); 3 Nov 2010 05:39:32 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-ww0-f41.google.com (HELO mail-ww0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Nov 2010 05:39:28 +0000 Received: by wwb13 with SMTP id 13so667029wwb.0 for ; Tue, 02 Nov 2010 22:39:25 -0700 (PDT) Received: by 10.216.163.203 with SMTP id a53mr10347930wel.94.1288762763751; Tue, 02 Nov 2010 22:39:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.182.139 with HTTP; Tue, 2 Nov 2010 22:39:03 -0700 (PDT) From: Hui Zhu Date: Wed, 03 Nov 2010 05:39:00 -0000 Message-ID: Subject: [PATCH] tracepoint: remote_trace_set_readonly_regions:change lma to vma To: gdb-patches ml Cc: Pedro Alves , Joel Brobecker Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00061.txt.bz2 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 * 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); }