public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/11380] New: print formats (/FMT) do not invoke Python pretty printers
@ 2010-03-15 22:49 chrisj at rtems dot org
2010-04-19 7:25 ` [Bug python/11380] " pmuldoon at redhat dot com
0 siblings, 1 reply; 3+ messages in thread
From: chrisj at rtems dot org @ 2010-03-15 22:49 UTC (permalink / raw)
To: gdb-prs
If a /FMT is used with the print command a type's pretty printer is not invoked.
For example a pretty printer to print an RTEMS Object ID (an unsigned long)
produces:
(gdb) p /f the_semaphore->Object.id
$10 = to_string = {
id = 436273170,
node = 1,
api = classic,
class = semaphores,
index = 18
}
and with a /FMT option added:
(gdb) p /c the_semaphore->Object.id
$15 = 18 '\022'
(gdb) p /f the_semaphore->Object.id
$16 = 2.66766316e-23
(gdb) p /u the_semaphore->Object.id
$17 = 436273170
(gdb) p /t the_semaphore->Object.id
$18 = 11010000000010000000000010010
It would be nice if the pretty printer followed the requested output where a
printer is creating a struct type output (display hint 'struct').
--
Summary: print formats (/FMT) do not invoke Python pretty
printers
Product: gdb
Version: 7.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: python
AssignedTo: unassigned at sourceware dot org
ReportedBy: chrisj at rtems dot org
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11380
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug python/11380] print formats (/FMT) do not invoke Python pretty printers
2010-03-15 22:49 [Bug python/11380] New: print formats (/FMT) do not invoke Python pretty printers chrisj at rtems dot org
@ 2010-04-19 7:25 ` pmuldoon at redhat dot com
0 siblings, 0 replies; 3+ messages in thread
From: pmuldoon at redhat dot com @ 2010-04-19 7:25 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://sourceware.org/bugzilla/show_bug.cgi?id=11380
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug python/11380] print formats (/FMT) do not invoke Python pretty printers
[not found] <bug-11380-4717@http.sourceware.org/bugzilla/>
@ 2014-08-19 16:31 ` dje at google dot com
0 siblings, 0 replies; 3+ messages in thread
From: dje at google dot com @ 2014-08-19 16:31 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=11380
dje at google dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |dje at google dot com
Resolution|--- |WORKSFORME
--- Comment #1 from dje at google dot com ---
I guess this has been fixed since, because I can't repro this.
[btw, I'm assuming there's a typo in the repro instructions:
Is it possible the first "p /f the_semaphore->Object.id" was actually "p
the_semaphore.Object" ?]
>From the gdb build tree, after running the py-prettyprint.exp testcase:
bash$ make run
(gdb) file testsuite/gdb.python/py-prettyprint
(gdb) source ../src/gdb/testsuite/gdb.python/py-prettyprint.py
(gdb) start
[...]
264 string x = make_string ("this is x");
(gdb) n
265 zzz_type c = make_container ("container");
(gdb)
266 zzz_type c2 = make_container ("container2");
(gdb)
267 const struct string_repr cstring = { { "const string" } };
(gdb)
277 nstype.elements = narray;
(gdb)
278 nstype.len = 0;
(gdb)
280 me.s = "blah";
(gdb)
282 init_ss(&ss, 1, 2);
(gdb)
283 init_ss(ssa+0, 3, 4);
(gdb)
284 init_ss(ssa+1, 5, 6);
(gdb)
285 memset (&nullstr, 0, sizeof nullstr);
(gdb) p ss
$1 = a=< a=<1> b=<0x7fffffffe670>> b=< a=<2> b=<0x7fffffffe680>>
(gdb) p/x ss
$2 = a=< a=<1> b=<0x7fffffffe670>> b=< a=<2> b=<0x7fffffffe680>>
(gdb) p/r ss
$3 = {
a = {
a = 0x1,
b = 0x7fffffffe670
},
b = {
a = 0x2,
b = 0x7fffffffe680
}
}
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-19 16:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-15 22:49 [Bug python/11380] New: print formats (/FMT) do not invoke Python pretty printers chrisj at rtems dot org
2010-04-19 7:25 ` [Bug python/11380] " pmuldoon at redhat dot com
[not found] <bug-11380-4717@http.sourceware.org/bugzilla/>
2014-08-19 16:31 ` dje at google dot com
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).