public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ssbssa at sourceware dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/11482] Side effect of set print address on python API
Date: Fri, 15 Jan 2021 16:09:01 +0000	[thread overview]
Message-ID: <bug-11482-4717-XfMvPAejNl@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-11482-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=11482

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org

--- Comment #26 from Hannes Domani <ssbssa at sourceware dot org> ---
Maybe not exactly what was wanted here, but since [1] it's possible to
explicitly enable or disable printing of the address in Value.format_string, no
matter how it's set with 'set print address'.

So to always enable the address, use Value.format_string(address=True), like:

(gdb) py print(gdb.parse_and_eval("argv"))
0x5a1f90
(gdb) py print(gdb.parse_and_eval("argv").format_string())
0x5a1f90
(gdb) set print address off
(gdb) py print(gdb.parse_and_eval("argv").format_string())

(gdb) py print(gdb.parse_and_eval("argv").format_string(address=True))
0x5a1f90


[1]
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=4aea001fd84a05f1e552c5dea1025e3f62dd2d7e

-- 
You are receiving this mail because:
You are on the CC list for the bug.

       reply	other threads:[~2021-01-15 16:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-11482-4717@http.sourceware.org/bugzilla/>
2021-01-15 16:09 ` ssbssa at sourceware dot org [this message]
2024-06-22  0:24 ` ssbssa at sourceware dot org
2010-04-09 17:29 [Bug python/11482] New: " michel dot metzger at st dot com
2010-04-14 17:05 ` [Bug python/11482] " pmuldoon at redhat dot com
2010-04-14 17:47 ` michel dot metzger at st dot com
2010-04-14 20:05 ` pmuldoon at redhat dot com
2010-04-14 20:21 ` pmuldoon at redhat dot com
2010-04-14 21:07 ` michel dot metzger at st dot com
2010-04-14 21:29 ` pmuldoon at redhat dot com
2010-04-14 23:18 ` tromey at redhat dot com
2010-04-14 23:31 ` pedro at codesourcery dot com
2010-04-14 23:32 ` pedro at codesourcery dot com
2010-04-15 14:35 ` michel dot metzger at st dot com
2010-04-15 14:40 ` pedro at codesourcery dot com
2010-04-15 16:23 ` pmuldoon at redhat dot com
2010-04-15 16:28 ` pmuldoon at redhat dot com
2010-04-17  6:36 ` pmuldoon at redhat dot com
2010-04-19 22:00 ` tromey at redhat dot com
2010-04-21 15:26 ` michel dot metzger at st dot com
2010-04-21 15:27 ` michel dot metzger at st dot com
2010-05-06 13:16 ` pmuldoon at redhat dot com
2010-05-06 13:28 ` pmuldoon at redhat dot com
2010-05-06 13:29 ` pmuldoon at redhat dot com
2010-05-12 20:21 ` tromey at redhat dot com
2010-05-17  9:21 ` pmuldoon at redhat dot com
2010-05-17  9:22 ` pmuldoon at redhat dot com
2010-05-17  9:22 ` pmuldoon at redhat dot com
2010-05-19 14:57 ` michel dot metzger at st dot com
2010-05-19 14:59 ` michel dot metzger at st dot com
2010-05-19 23:01 ` tromey at redhat dot com
2010-05-20 14:37 ` michel dot metzger at st dot com
2010-06-30 17:37 ` tromey at redhat dot com

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=bug-11482-4717-XfMvPAejNl@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).