[Bug gdb/24052] New: Selectively suppress printing of fields which contain only zeros
tkoenig at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Tue Jan 1 19:24:00 GMT 2019
https://sourceware.org/bugzilla/show_bug.cgi?id=24052
Bug ID: 24052
Summary: Selectively suppress printing of fields which contain
only zeros
Product: gdb
Version: 8.2
Status: NEW
Severity: enhancement
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
Hi,
when debugging programs with large data structures, many of whom may
contain a lot of zeros, it could be quite useful to suppress those
which do not contain zeros.
An example, looking at an internal structure from gfortran:
(gdb) p *(e->symtree->n.sym)
$6 = {name = 0x7ffff73580a0 "a1", module = 0x0, declared_at = {nextc =
0x26e9024, lb = 0x26e8fc0}, ts = {type = BT_DERIVED, kind = 0, u = {derived =
0x268c030, cl = 0x268c030, pad = 40419376}, interface = 0x0, is_c_interop = 0,
is_iso_c = 0, f90_type = BT_UNKNOWN,
deferred = false, interop_kind = 0x0}, attr = {allocatable = 0, dimension =
0, codimension = 0, external = 0, intrinsic = 0, optional = 0, pointer = 0,
target = 0, value = 0, volatile_ = 0, temporary = 0, dummy = 0, result = 0,
assign = 0, threadprivate = 0,
not_always_present = 0, implied_index = 0, subref_array_pointer = 0,
proc_pointer = 0, asynchronous = 0, contiguous = 0, fe_temp = 0, automatic = 0,
class_pointer = 0, save = SAVE_NONE, data = 0, is_protected = 0, use_assoc = 0,
used_in_submodule = 0, use_only = 0,
use_rename = 0, imported = 0, host_assoc = 0, in_namelist = 0, in_common =
0, in_equivalence = 0, function = 0, subroutine = 0, procedure = 0, generic =
0, generic_copy = 0, implicit_type = 0, untyped = 0, is_bind_c = 0, extension =
0, is_class = 0, class_ok = 0,
vtab = 0, vtype = 0, is_c_interop = 0, is_iso_c = 0, sequence = 0,
elemental = 0, pure = 0, recursive = 0, unmaskable = 0, masked = 0, contained =
0, mod_proc = 0, abstract = 0, module_procedure = 0, public_used = 0,
implicit_pure = 0, array_outer_dependency = 0,
noreturn = 0, entry = 0, entry_master = 0, mixed_entry_master = 0,
always_explicit = 0, artificial = 0, referenced = 1, is_main_program = 0,
access = ACCESS_UNKNOWN, intent = INTENT_UNKNOWN, flavor = FL_VARIABLE,
if_source = IFSRC_UNKNOWN, proc = PROC_UNKNOWN,
cray_pointer = 0, cray_pointee = 0, alloc_comp = 0, pointer_comp = 0,
proc_pointer_comp = 0, private_comp = 0, zero_comp = 0, coarray_comp = 0,
lock_comp = 0, event_comp = 0, defined_assign_comp = 0, unlimited_polymorphic =
0, has_dtio_procs = 0, caf_token = 0,
select_type_temporary = 0, associate_var = 0, pdt_kind = 0, pdt_len = 0,
pdt_type = 0, pdt_template = 0, pdt_array = 0, pdt_string = 0,
omp_udr_artificial_var = 0, omp_declare_target = 0, omp_declare_target_link =
0, oacc_declare_create = 0,
oacc_declare_copyin = 0, oacc_declare_deviceptr = 0,
oacc_declare_device_resident = 0, oacc_declare_link = 0, oacc_function = 0,
ext_attr = 0, volatile_ns = 0x0, asynchronous_ns = 0x0}, generic = 0x0,
component_access = ACCESS_UNKNOWN, formal = 0x0,
formal_ns = 0x0, f2k_derived = 0x0, param_list = 0x0, value = 0x0, as = 0x0,
result = 0x0, components = 0x0, cp_pointer = 0x0, entry_id = 0, hash_value = 0,
common_next = 0x0, common_head = 0x0, dummy_order = 0, namelist = 0x0,
namelist_tail = 0x0, old_symbol = 0x0,
mark = 1, gfc_new = 0, tlink = 0x0, equiv_built = 0, forall_index = 0,
fn_result_spec = 0, resolved = 1, abr_modproc_decl = 0, refs = 1, ns =
0x26eeba0, backend_decl = 0x0, from_intmod = INTMOD_NONE, intmod_sym_id = 0,
binding_label = 0x0, common_block = 0x0,
assoc = 0x0, dt_next = 0x0}
This could then look somewhat like this:
(gdb) p *(e->symtree->n.sym)
$6 = {name = 0x7ffff73580a0 "a1", ..., declared_at = {nextc = 0x26e9024, lb =
0x26e8fc0}, ts = {type = BT_DERIVED, ..., u = {derived = 0x268c030, cl =
0x268c030, pad = 40419376}, ..., f90_type = BT_UNKNOWN, deferred = false, ...},
attr = {..., save = SAVE_NONE, ..., referenced = 1, ..., access =
ACCESS_UNKNOWN, intent = INTENT_UNKNOWN, flavor = FL_VARIABLE, if_source =
IFSRC_UNKNOWN, proc = PROC_UNKNOWN, ...}, ..., component_access =
ACCESS_UNKNOWN, ..., mark = 1, ..., resolved = 1, ..., refs = 1, ns =
0x26eeba0, ..., from_intmod = INTMOD_NONE, ...}
Optionally also removing those enums which evaluate to zero would
save even more unneeded information.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list