diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2023-12-08 18:19:42 +0100 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2023-12-08 18:21:25 +0100 |
commit | 7543c960b00ddea23f6105eff4358ec214a7f93c (patch) | |
tree | e0c98671bfe860eb8009b1864db9982c91469f3c /bfd/pei-mcore.c | |
parent | ee1e9bbb5139d766d70cfa036979cec73a1223b7 (diff) | |
download | gdb-7543c960b00ddea23f6105eff4358ec214a7f93c.zip gdb-7543c960b00ddea23f6105eff4358ec214a7f93c.tar.gz gdb-7543c960b00ddea23f6105eff4358ec214a7f93c.tar.bz2 |
Use pretty printers for struct member stubs
PR29079 shows that pretty printers can be used for an incomplete
type (stub), but only when printing it directly, not if it's
part of another struct:
```
(gdb) p s
$1 = {pp m_i = 5}
(gdb) p s2
$2 = {m_s = <incomplete type>, m_l = 20}
```
The reason is simply that in common_val_print the check for stubs
is before any pretty printer is tried.
It works if the pretty printer is tried before the stub check:
```
(gdb) p s
$1 = {pp m_i = 5}
(gdb) p s2
$2 = {m_s = {pp m_i = 10}, m_l = 20}
```
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29079
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'bfd/pei-mcore.c')
0 files changed, 0 insertions, 0 deletions