I am trying to customize the output of x such that I only get one
column.
I do:
(gdb) set width 22
(gdb) x/4xw myvar
0x22c8b0: 0x00000000 0x00000000 0x00000000 0x00000000
But it rather like to get:
0x22c8b0: 0x00000000
0x22c8b4: 0x00000000
0x22c8b8: 0x00000000
0x22c8bC: 0x00000000
What am I missing?
x /xw myvar
x /xw myvar + 1
x /xw myvar + 2
x /xw myvar + 3
Of course a custom command would be harder to make more general if you
aren't always looking for this exact type of output.
> I am trying to customize the output of x such that I only get one
> column.
>
> (gdb) x/4xw myvar
> 0x22c8b0: 0x00000000 0x00000000 0x00000000 0x00000000
>
> But it rather like to get:
> 0x22c8b0: 0x00000000
> 0x22c8b4: 0x00000000
> 0x22c8b8: 0x00000000
> 0x22c8bC: 0x00000000
>
> What am I missing?
GDB isn't flexible that way :(
The code in gdb/printcmd.c reads:
do_examine (struct format_data fmt, CORE_ADDR addr)
...
maxelts = 8;
if (size == 'w')
maxelts = 4;
if (size == 'g')
maxelts = 2;
if (format == 's' || format == 'i')
maxelts = 1;
and then prints maxelts elements per line.
The good news is that you can build your own GDB which will do
exactly what you want.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.