aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-frame.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2025-04-24 16:01:47 -0400
committerSimon Marchi <simon.marchi@efficios.com>2025-04-29 15:54:17 -0400
commitdbfd92856a3cda8fd08a06c150e5c8f5cf8990be (patch)
treee64c2dd2534df775e183674db0370fabb80508a6 /gdb/python/py-frame.c
parent605b4e6f36615974635a17eed999c8ee34821e92 (diff)
downloadbinutils-dbfd92856a3cda8fd08a06c150e5c8f5cf8990be.zip
binutils-dbfd92856a3cda8fd08a06c150e5c8f5cf8990be.tar.gz
binutils-dbfd92856a3cda8fd08a06c150e5c8f5cf8990be.tar.bz2
gdb/dwarf: clean up some cutu_reader::is_dummy() calls
This patch tries to standardize the places where we check if units are dummy. When checking if a unit is dummy, it is not necessary to check for some other conditions. - cutu_reader::is_dummy() is a superset of cutu_reader::cu() returning nullptr, so it's not necessary to check if the cu method return nullptr if also checking if the unit is dummy. - cutu_reader::is_dummy() is a superset of cutu_reader::top_level_die() returning nullptr, so same deal. Remove some spots that check for these conditions in addition to cutu_reader::is_dummy(). In addition, also remove the checks for: !new_reader->top_level_die ()->has_children in cooked_indexer::ensure_cu_exists. IMO, it is not useful to special case the units having a single DIE. Especially in this function, which deals with importing things from another unit, a unit with a single DIE would be an edge case that should not happen with good debug info. I think it's preferable to have simpler code. Change-Id: I4529d7b3a0bd2891a60f41671de8cfd3114adb4a Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-frame.c')
0 files changed, 0 insertions, 0 deletions