diff options
author | Tom Tromey <tromey@adacore.com> | 2021-09-13 12:31:20 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2021-10-05 12:34:55 -0600 |
commit | 3e44c3049fc23f5ba894b346b7defdfba66b076e (patch) | |
tree | 5486581f3787291c83ff78c0506f63dce9711136 /gdb/gdb_bfd.h | |
parent | a519e8ffe2b0f008deaef1517562090d9eaadccc (diff) | |
download | gdb-3e44c3049fc23f5ba894b346b7defdfba66b076e.zip gdb-3e44c3049fc23f5ba894b346b7defdfba66b076e.tar.gz gdb-3e44c3049fc23f5ba894b346b7defdfba66b076e.tar.bz2 |
Allow lazy 'zero' value
This changes value_zero to create a lazy value. In many cases,
value_zero is called in expression evaluation to wrap a type in a
non-eval context. It seems senseless to allocate a buffer in these
cases.
A new 'is_zero' flag is added so we can preserve the existing
assertions in value_fetch_lazy.
A subsequent patch will add a test where creating a zero value would
fail, due to the variable size check. However, the contents of this
value are never needed, and so creating a lazy value avoids the error
case.
Diffstat (limited to 'gdb/gdb_bfd.h')
0 files changed, 0 insertions, 0 deletions