Question: *I know that for Android it's possible to use Chrome://inspect to view the phone screen on your desktop. Clicking there is equal to tapping on the phone.*
It's fine for browsers and after 4.4 - for apps that have some special lines of code inserted.

Whether it's possible for iPhone / iPad?
i.e. I have a REAL device with latest OS installed, which screen I'd like to be shown on MAC + clicking on the items on the screen will be equal to tappping on the phone.

Answer: 
For C, gdb's "expression language" is just ordinary C expressions, with a few handy extensions for debugging. This is less true for C++, primarily because C++ is just much more difficult to parse, so there expression language tends to be a subset of C++ plus some gdb extensions.

So, the short answer is you can just type:

```
(gdb) print sizeof(mystruct)

```

However, there are caveats.

First, gdb's current language matters. You can find this with `show language`. In the case of a `struct` type, in C++ there is an automatic typedef, but in C there is not. So if you are using the `auto` language (and you usually should), and are stopped in a C frame, you will need to use the keyword:

```
(gdb) print sizeof(struct mystruct)

```

Now, this still may not work. The usual reason at this point is that the structure isn't used in your program, and so doesn't show up in the debug info. The debug info can be optimized out even if you think it ought to have been available, because it is up to the compiler. For example, I think if a `struct` is only used in `sizeof` expressions (and no variable is ever defined of that type), then I think (hard to remember for sure) that GCC won't emit DWARF for it.

You can check to see if the type is available using `readelf` or `dwgrep`, like:

```
$ readelf -wi myexecutableorlibrary | grep mystruct

```

(Though in real life I usually use `less` and then examine the DWARF DIEs carefully. You will need to know a little DWARF to make sense of this.)

Sometimes in gdb it's handy to use the "filename" extension to specify exactly which entity you mean. Like:

```
(gdb) print 'myfile.c'::variable

```

Not sure if that works for types, and anyway it shouldn't usually be necessary for them.
In C/C++, you have the `sizeof` function which will give you the size of any type (including `struct`) or variable.

I'm not sure if you can apply this while debugging but you could simply have a test program with the same headers (type definitions) tell you what the size of your types is.