public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Wei-cheng Wang <cole945@gmail.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/7 v3] Tracepoint for ppc64.
Date: Sat, 27 Jun 2015 17:48:00 -0000	[thread overview]
Message-ID: <CAPmZyH5Uu2BJNMyWUU7rLBbnBaHzn5AhHBHA8CdfCSKjGB+hKQ@mail.gmail.com> (raw)
In-Reply-To: <20150408165700.E9630CF20@oc7340732750.ibm.com>

Hi,

On Thu, Apr 9, 2015 at 12:57 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> Wei-cheng Wang wrote:
>> The fail cases in gdb-unavailable are caused by inaccessible vtable for object
>> For x86, such structures (_ZVTxxx) are put in .rodata section, so gdb can read
>> them in local file if not collected by tracepoint action, but for PowerpPC,
>> they are put in .rel.ro sections.  Technically they not read-only, so gdb won't
>> read them in file if not collected.
>
> Is this really a difference between Intel and PowerPC, or this is rather
> a difference between different binutils levels?  I don't see off-hand
> why this should be Power-specific ...  Do you have example assembler
> code that shows the difference?

ppc64le:

        .weak   _ZTV7Derived
        .section
.data.rel.ro._ZTV7Derived,"awG",@progbits,_ZTV7Derived,comdat
                        ^^^^^^^^^^^^^              ^^^
        .align 3
        .type   _ZTV7Derived, @object
        .size   _ZTV7Derived, 56
_ZTV7Derived:
        .quad   28
        .quad   16
        .quad   0
        .quad   _ZTI7Derived
        .quad   12
        .quad   -16
        .quad   _ZTI7Derived
        .weak   _ZTT7Derived

x86_64:

        .section        .rodata._ZTV7Derived,"aG",@progbits,_ZTV7Derived,comdat
                        ^^^^^^^^              ^^^
        .align 32
        .type   _ZTV7Derived, @object
        .size   _ZTV7Derived, 56
_ZTV7Derived:
        .quad   28
        .quad   16
        .quad   0
        .quad   _ZTI7Derived
        .quad   12
        .quad   -16
        .quad   _ZTI7Derived
        .weak   _ZTT7Derived


The assembly code can be reproduced by compiling gdb.trace/unavailable.c

In this case, gdb wants to access (vtable for Derived + 32).
Because it's not collected, gdb tries to see if the address is read-only,
so it can access it from files.  See also remote_xfer_live_readonly_partial.

Thanks,
Wei-cheng

  reply	other threads:[~2015-06-27 17:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 16:31 [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver Wei-cheng Wang
2015-03-30 16:31 ` [PATCH 4/7 v3] Allow target to decide where to map jump-pad Wei-cheng Wang
2015-04-08 17:04   ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 3/7 v3] Add testcases for ppc64 tracepoint Wei-cheng Wang
2015-04-08 17:02   ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 7/7 v3] Remove tracepoint_action ops Wei-cheng Wang
2015-04-08 17:09   ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 5/7 v3] Replace write_inferior_data_ptr with write_inferior_data_pointer Wei-cheng Wang
2015-04-08 17:06   ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 2/7 v3] Tracepoint for ppc64 Wei-cheng Wang
2015-04-08 16:57   ` Ulrich Weigand
2015-06-27 17:48     ` Wei-cheng Wang [this message]
2015-07-03 16:42       ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 6/7 v3] Build unavailable-stack frames for tracepoint Wei-cheng Wang
2015-04-08 17:07   ` Ulrich Weigand
2016-02-22  5:28   ` Marcin Kościelnicki
2016-02-23 18:58     ` Ulrich Weigand
2016-02-24  3:18       ` Marcin Kościelnicki
2016-02-24 20:44         ` Sergio Durigan Junior
2016-02-24 21:06           ` [PATCH] [OBV] gdb/rs6000: Fix maybe-uninitialized warning Marcin Kościelnicki
2015-04-08 16:56 ` [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver Ulrich Weigand

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=CAPmZyH5Uu2BJNMyWUU7rLBbnBaHzn5AhHBHA8CdfCSKjGB+hKQ@mail.gmail.com \
    --to=cole945@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).