[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZyzSHxq8WuPp_Ewx@pathway.suse.cz>
Date: Thu, 7 Nov 2024 15:43:43 +0100
From: Petr Mladek <pmladek@...e.com>
To: metux <metux@....de>
Cc: Ira Weiny <ira.weiny@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jonathan Corbet <corbet@....net>,
Davidlohr Bueso <dave@...olabs.net>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Fan Ni <fan.ni@...sung.com>, Bagas Sanjaya <bagasdotme@...il.com>,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-cxl@...r.kernel.org
Subject: Re: [PATCH v2 0/4] printf: Add struct range print specifier
On Wed 2024-10-30 11:51:54, metux wrote:
> On 26.10.24 02:46, Ira Weiny wrote:
> > Support for the Compute Express Link (CXL) Dynamic Capacity Devices
> > (DCD) have grown a number of uses to print struct range.[1] Support for
> > a printf specifier '%pra' was being worked within a large series and has
> > garnered a number of comments and discussion.
>
> This is just printing out hex dump of a memory range, correct ?
>
> What I'm looking for quite some time is a sane way for dumping structs
> in a human readable form (field: value pairs, using their actual types
> eg. int vs string, ...).
You like to print it similar way like "gdb" or other debugging tools do.
Do I get it correctly, please?
> Any idea to do that in a generic way ?
> (potentially using debug info ?)
I am afraid that a generic solution would really need to work with
a debuginfo.
That said, there exists some generic approaches for printing various
values in the trace code, for example, see
Documentation/trace/kprobetrace.rst
Documentation/trace/events.rst
Best Regards,
Petr
Powered by blists - more mailing lists