Bug 29186 - Get the output format of the current print command for pretty printer
Summary: Get the output format of the current print command for pretty printer
Status: RESOLVED DUPLICATE of bug 17291
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: HEAD
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-26 00:40 UTC by YEN-TE SHIH
Modified: 2022-06-05 16:19 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description YEN-TE SHIH 2022-05-26 00:40:51 UTC
Hi,

This request is actually the same with this stackoverflow ticket:
https://stackoverflow.com/questions/71704359/how-does-gdb-pretty-printer-know-the-output-format-the-user-is-requesting

I am unable to use the children APIs because our structure is big which needs some kinds of special formatting.

And, the users want to use p/x to switch from decimal to hexadecimal.

Could we have a way to get the chosen print format by a python API?

Thank you very much.

Best,
John
Comment 1 Tom Tromey 2022-06-05 16:19:41 UTC
This is a dup; but agreed that this would be a good addition.

*** This bug has been marked as a duplicate of bug 17291 ***