On 4 June 2015 at 09:36, Jan Kratochvil <jan.kratoch...@redhat.com> wrote: > On Thu, 04 Jun 2015 09:24:36 +0200, Manuel López-Ibáñez wrote: >> On 3 June 2015 at 22:58, Jan Kratochvil <jan.kratoch...@redhat.com> wrote: > These two expressions are equivalent for all operations except of sizeof(): > pointer > (*pointer@ANYTHING) >
Sure, but is this case really that important? After all, the user can type just 'pointer' and in this case @ANYTHING does not matter at all. In the case of sizeof(), the user can also use sizeof(*pointer) * ANYTHING. Moreover, one can always do: (gdb) p a[0]@5 $10 = "somet" (gdb) p $10 + 5 $11 = 0x80484c5 <a+5> "ignoeisopjffaldjkñfqñlkjfel" My understanding is that there is nothing one can get by means of @ that one cannot get with standard C, except for printing a memory region, and for that purpose one only needs to parse LHS@RHS and only one @ makes sense within the same print command. Again, I may be unaware of other uses of @, but no case shown so far has convinced me otherwise. > With these constructs I want to say that it is not easy to make the LHS@RHS > split in GDB without limiting valid expressions it can accept. Let's leave it then at my limited experience with GDB then, since I cannot imagine why anyone who is not a GDB hacker who understands the fine details of @ would think about writing such expression rather than plain C/C++. :) Thanks for your patience, Manuel.