This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The str () function, called on a gdb.Value instance, produces a string representation similar to what can be achieved with the print command, but it doesn't allow to specify additional formatting settings, for instance disabling pretty printers. The attached patch introduces a new format_string () method to gdb.Value which allows specifying more formatting options, thus giving access to more features provided by the internal C function common_val_print (). This patch is longer than I usually like for my patches, but it's a single feature and I didn't think it was particularly useful to split it in a patch adding the C function, one for the test, one for the docs. Let me know if you disagree and would prefer me to split it in some way. I've never contributed to GDB before, so I filled up and signed all the legal documents, but I haven't received the final document signed by the FSF yet. Thanks!
Attachment:
0001-Add-gdb.Value.format_string.patch
Description: Binary data
-- Marco Barisione
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |