'Print artificial arrays in gdb with separators between items

The artificial array feature of gdb is great for dumping an array of structures in memory (using the @ symbol). However, it ends up being hard to read because there are no separators between the array records. Is there an easy way to add a newline between each array record? I searched extensively but did not find a solution.

For example:

(gdb) p priv->chanInfo[0]@4
$12 = {{speakers = 0x7ffff4019800, voiceProgram = 0x555555bedaf0, voiceCount = 1, bankProgram = 0, genStartIndex = 5, 
    attribTable = {0x7ffff40170a0, 0x7ffff4017160, 0x7ffff40171a0, 0x7ffff40171e0, 0x7ffff4017220, 0x0, 0x0, 0x0, 0x0, 0x0}}, {
    speakers = 0x7ffff4019d80, voiceProgram = 0x555555bedaf0, voiceCount = 0, bankProgram = 0, genStartIndex = 14, 
    attribTable = {0x7ffff40170a0, 0x7ffff4017280, 0x7ffff40172c0, 0x7ffff4017300, 0x7ffff4017340, 0x0, 0x0, 0x0, 0x0, 0x0}}, {
    speakers = 0x7ffff401a300, voiceProgram = 0x555555bedaf0, voiceCount = 0, bankProgram = 0, genStartIndex = 23, 
    attribTable = {0x7ffff40170a0, 0x7ffff40173a0, 0x7ffff40173e0, 0x7ffff4017420, 0x7ffff4017460, 0x0, 0x0, 0x0, 0x0, 0x0}}, {
    speakers = 0x7ffff401a880, voiceProgram = 0x555555bedaf0, voiceCount = 0, bankProgram = 0, genStartIndex = 32, 
    attribTable = {0x7ffff40170a0, 0x7ffff40174c0, 0x7ffff4017500, 0x7ffff4017540, 0x7ffff4017580, 0x0, 0x0, 0x0, 0x0, 0x0}}}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source