Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: Yao Qi <qiyaoltc@gmail.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] PR varobj/18564  regression in showing __thread so extern variable
Date: Thu, 03 Sep 2015 09:37:00 -0000	[thread overview]
Message-ID: <86h9nbyhb6.fsf@gmail.com> (raw)
In-Reply-To: <1441229015.13071.23.camel@skynet.be> (Philippe Waroquiers's	message of "Wed, 02 Sep 2015 23:23:35 +0200")

Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:

>> > +{
>> > +   so_extern = &so_extern;
>> > +   printf("address is %p\n", &so_extern); /* break here to check result */
>> 
>> Don't have to call printf and include stdio.h.
> Not clear by what to replace this printf (or why it harms).
>

We don't have to get printf involved in the test, because some targets
may don't have printf at all.

> I need to put a break after the assignment, as the .exp 
> will compare so_extern value with address of so_extern.
> (note: I changed the .exp, so as to also check so_extern value
> in main thread).
> The printf line allows to put a break after the assignment.
> If it is really better to remove the printf/stdio.h, any suggestion
> about what to replace it with ? (we need to avoid the compiler to
> optimise away this code to be sure we can put a break).

We can replace it with "i++;" (i is a local variable, or a volatile
global variable).

-- 
Yao (齐尧)


  reply	other threads:[~2015-09-03  9:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30 11:34 Philippe Waroquiers
2015-09-02 13:03 ` Yao Qi
2015-09-02 21:23   ` Philippe Waroquiers
2015-09-03  9:37     ` Yao Qi [this message]
2015-09-03 22:03       ` [PATCH V2] " Philippe Waroquiers
2015-09-10 14:34         ` Pedro Alves
2015-09-15 19:15           ` Philippe Waroquiers
2015-09-10 20:14         ` Sergio Durigan Junior
2015-09-10 20:17           ` Sergio Durigan Junior

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=86h9nbyhb6.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=philippe.waroquiers@skynet.be \
    /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