public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "sphink at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug exp/13424] New: Display field offsets Date: Mon, 21 Nov 2011 22:26:00 -0000 [thread overview] Message-ID: <bug-13424-4717@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=13424 Bug #: 13424 Summary: Display field offsets Product: gdb Version: unknown Status: NEW Severity: enhancement Priority: P2 Component: exp AssignedTo: unassigned@sourceware.org ReportedBy: sphink@gmail.com Classification: Unclassified Created attachment 6068 --> http://sourceware.org/bugzilla/attachment.cgi?id=6068 Display C struct field offsets For figuring out where things will be on a cache line (among other things), it would be useful to be able to display the byte offset of each field in a C/C++ struct. That in itself seems pretty straightforward -- I'll attach a patch that does just that -- but I can't see a good way of enabling it. I wouldn't want it to be the default, since it's just too noisy. I would want it to be controlled by 'set print field-offsets on' or an optional parameter to 'ptype' or something. But it appears that typeprint.c only passes an integer 'show' parameter to the language-specific type printers. I could overload 'show' to be a set of flags (the existing 1,0,-1 would be full,summary,short, and I would have a new fields option to or in), but that would require updating all languages (and would break external compatibility, if there is such a thing.) What would be the best way to implement something like this? -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next reply other threads:[~2011-11-21 22:26 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-11-21 22:26 sphink at gmail dot com [this message] 2011-11-21 22:28 ` [Bug exp/13424] " sphink at gmail dot com 2011-11-22 19:27 ` tromey at redhat dot com 2013-03-15 17:43 ` 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-13424-4717@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: linkBe 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).