Skip to content

Option to print an array on one line #119454

@AaronSteen

Description

@AaronSteen

I recently posted a question on StackOverflow about options in LLDB for printing C arrays on a single line. As it seems that it's not possible to do so without creating a custom command, Jim Ingham encouraged me to request that as an option here.

To summarize my issue, I'm looking for the ability to print an array's contents on a single line, instead of printing each value on its own line, as the parray command does. Basically, print it so that it looks like an array initializer. I have consulted extensively the LLDB Tutorial and attempted to use the type summary and synthetic child printing options, but as Jim noted, these do not work for arrays. For my personal workflow, I find vertical screen real estate to be very valuable, especially if I'm already using the majority of it to display some variables and 20 or so lines of code at each stop, so for small arrays I feel that an initializer-style print option makes a lot of sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions