/illumos-gate/usr/src/tools/smatch/src/ |
H A D | compile-i386.c | 433 stor->sym = sym; in stor_sym_init() 1062 emit_object_pre(show_ident(sym->ident), sym->ctype.modifiers, in emit_array() 1084 x86_symbol(sym); in emit_one_symbol() 1124 sym->ctype.modifiers, sym->ctype.alignment, in emit_scalar_noinit() 1132 sym->ctype.modifiers, sym->ctype.alignment, in emit_array_noinit() 1133 get_expression_value(sym->array_size) * (sym->bit_size / 8)); in emit_array_noinit() 1619 sym->aux = priv; in emit_symbol_expr_init() 1796 …"\t%s:%d:%ld at offset %ld.%d", show_ident(sym->ident), sym->bit_size, sym->ctype.alignment, sym->… in x86_struct_member() 1804 if (!sym) in x86_symbol() 1829 emit_scalar(sym->initializer, sym->bit_size); in x86_symbol() [all …]
|
H A D | check_check_deref.c | 45 set_state(my_id, sm->name, sm->sym, &ok); in is_ok() 61 if (is_ignored(my_id, sm->name, sm->sym)) in check_dereference() 74 add_ignore(my_id, sm->name, sm->sym); in check_dereference() 85 sm = get_sm_state(my_id, name, sym); in check_dereference_name_sym() 88 if (is_ignored(my_id, sm->name, sm->sym)) in check_dereference_name_sym() 90 if (implied_not_equal_name_sym(name, sym, 0)) in check_dereference_name_sym() 101 add_ignore(my_id, sm->name, sm->sym); in check_dereference_name_sym() 123 struct symbol *sym; in set_param_dereferenced() local 126 name = get_variable_from_key(arg, key, &sym); in set_param_dereferenced() 127 if (!name || !sym) in set_param_dereferenced() [all …]
|
H A D | smatch_return_to_param.c | 34 static struct smatch_state *alloc_my_state(const char *name, struct symbol *sym) in alloc_my_state() argument 40 state->data = sym; in alloc_my_state() 48 set_state(my_id, sm->name, sm->sym, &undefined); in undef() 58 skip = sym->ident->len + 2; in map_call_to_other_name_sym() 60 state = get_state(my_id, sym->ident->name, sym); in map_call_to_other_name_sym() 74 if (sm->state->data != sym) in map_my_state_long_to_short() 85 *new_sym = sm->sym; in map_my_state_long_to_short() 107 ret = map_my_state_long_to_short(sm, name, sym, new_sym, use_stack); in map_long_to_short_name_sym() 121 char *map_call_to_param_name_sym(struct expression *expr, struct symbol **sym) in map_call_to_param_name_sym() argument 127 *sym = NULL; in map_call_to_param_name_sym() [all …]
|
H A D | check_release_resource.c | 35 struct symbol *sym; in match_request() local 40 name = expr_to_var_sym(arg_expr, &sym); in match_request() 41 if (!name || !sym) in match_request() 43 add_tracker(&resource_list, my_id, name, sym); in match_request() 53 struct symbol *sym; in match_release() local 61 name = expr_to_var_sym(arg_expr, &sym); in match_release() 62 if (!name || !sym) in match_release() 64 if (in_tracker_list(resource_list, my_id, name, sym)) in match_release() 71 static void match_end_func(struct symbol *sym) in match_end_func() argument
|
H A D | smatch_parse_call_math.c | 123 struct symbol *sym; in read_rl_from_var() local 270 struct symbol *sym; in get_arg_number() local 277 sym = expr->symbol; in get_arg_number() 281 if (arg == sym) in get_arg_number() 296 if (!name || !sym || !sym->ident) in format_name_sym_helper() 328 struct symbol *sym; in format_variable_helper() local 339 struct symbol *sym; in format_call_to_param_mapping() local 554 struct symbol *sym; in get_allocation_recipe_from_call() local 563 sym = expr->fn->symbol; in get_allocation_recipe_from_call() 564 if (!sym) in get_allocation_recipe_from_call() [all …]
|
H A D | smatch_kernel_user_data.c | 374 struct symbol *sym; in is_skb_data() local 394 if (!sym) in is_skb_data() 396 sym = get_real_base_type(sym); in is_skb_data() 397 if (!sym || sym->type != SYM_PTR) in is_skb_data() 399 sym = get_real_base_type(sym); in is_skb_data() 400 if (!sym || sym->type != SYM_STRUCT || !sym->ident) in is_skb_data() 446 struct symbol *sym; in points_to_user_data() local 469 if (!name || !sym) in points_to_user_data() 488 if (!name || !sym) in set_points_to_user_data() 856 if (tmp->sym == sym) in has_user_data() [all …]
|
H A D | dissect.c | 128 sym.ident = name; in no_member() 130 return &sym; in no_member() 163 if (!sym) { in expr_symbol() 166 if (!sym) { in expr_symbol() 173 if (!sym->ctype.base_type) in expr_symbol() 176 return sym; in expr_symbol() 248 if (!sym) in base_type() 580 type = base_type(sym); in do_symbol() 587 if (!sym->initializer) in do_symbol() 590 reporter->r_symbol(U_W_VAL, &sym->pos, sym); in do_symbol() [all …]
|
H A D | smatch_slist.h | 10 struct symbol *sym; member 27 struct symbol *sym, struct smatch_state *state); 41 struct symbol *sym); 44 struct symbol *sym); 49 struct symbol *sym, struct smatch_state *state); 53 struct symbol *sym); 56 struct symbol *sym); 68 struct symbol *sym, struct smatch_state *state); 72 struct symbol *sym); 74 const char *name, struct symbol *sym); [all …]
|
H A D | smatch_about_fn_ptr_arg.c | 75 struct symbol *sym; in match_assign_param() local 81 name = expr_to_var_sym(expr->left, &sym); in match_assign_param() 82 if (!name || !sym) { in match_assign_param() 87 if (sym != next_param_sym || in match_assign_param() 118 *sym = NULL; in get_data_member() 143 *sym = tmp_sym; in get_data_member() 150 struct symbol *sym; in match_assign_function() local 170 if (!data_member || !sym) { in match_assign_function() 175 arg = get_assigned_expr_name_sym(data_member, sym); in match_assign_function() 180 next_param_sym = sym; in match_assign_function() [all …]
|
H A D | smatch_slist.c | 113 if (!b->sym && a->sym) in cmp_tracker() 115 if (!a->sym && b->sym) in cmp_tracker() 117 if (a->sym < b->sym) in cmp_tracker() 119 if (a->sym > b->sym) in cmp_tracker() 197 sm_state->sym = sym; in alloc_sm_state() 526 .sym = sym, in get_sm_state_stree() 583 sm->sym = sym; in set_state_stree_perm() 590 struct symbol *sym) in delete_state_stree() argument 595 .sym = sym, in delete_state_stree() 602 struct symbol *sym) in delete_state_stree_stack() argument [all …]
|
H A D | check_implicit_dependencies.c | 37 macro = get_macro_name(sym->pos); in match_syscall_definition() 55 if (tracker->sym == sym) // don't re-parse in match_syscall_definition() 60 cur_syscall = sym; in match_syscall_definition() 127 static void match_after_syscall(struct symbol *sym) in match_after_syscall() argument 129 if (!cur_syscall || sym != cur_syscall) in match_after_syscall() 149 struct symbol *sym; in print_read_member_type() local 156 sym = get_type(expr->deref); in print_read_member_type() 174 add_tracker(&read_list, my_id, member, sym); in print_read_member_type() 184 struct symbol *sym; in print_write_member_type() local 191 sym = get_type(expr->deref); in print_write_member_type() [all …]
|
H A D | obfuscate.c | 48 static void emit_symbol(struct symbol *sym) in emit_symbol() argument 51 ep = linearize_symbol(sym); in emit_symbol() 58 struct symbol *sym; in emit_symbol_list() local 60 FOR_EACH_PTR(list, sym) { in emit_symbol_list() 61 expand_symbol(sym); in emit_symbol_list() 62 emit_symbol(sym); in emit_symbol_list() 63 } END_FOR_EACH_PTR(sym); in emit_symbol_list()
|
H A D | smatch_modification_hooks.c | 90 if (sym != sm->sym) in matches() 117 prev = get_state(my_id, name, sym); in call_modification_hooks_name_sym() 125 match = matches(name, sym, sm); in call_modification_hooks_name_sym() 144 struct symbol *sym; in call_modification_hooks() local 146 name = expr_to_known_chunk_sym(expr, &sym); in call_modification_hooks() 149 call_modification_hooks_name_sym(name, sym, mod_expr, late); in call_modification_hooks() 158 struct symbol *sym, *other_sym; in db_param_add() local 169 name = get_variable_from_key(arg, key, &sym); in db_param_add() 170 if (!name || !sym) in db_param_add() 174 call_modification_hooks_name_sym(name, sym, expr, BOTH); in db_param_add() [all …]
|
H A D | check_nospec.c | 73 set_state(my_id, fullname, sym, &nospec); in set_param_nospec() 92 if (!get_user_rl_var_sym(sm->name, sm->sym, &rl)) in struct_member_callback() 111 param = get_param_num_from_sym(sm->sym); in returned_struct_members() 113 if (!returned_sym || returned_sym != sm->sym) in returned_struct_members() 124 if (!get_user_rl_var_sym(sm->name, sm->sym, &rl)) in returned_struct_members() 149 struct symbol *sym; in db_returns_nospec() local 166 name = get_variable_from_key(arg, key, &sym); in db_returns_nospec() 168 if (!name || !sym) in db_returns_nospec() 171 set_state(my_id, name, sym, &nospec); in db_returns_nospec() 214 if (!is_capped_var_sym(sm->name, sm->sym)) in mark_user_data_as_nospec() [all …]
|
H A D | smatch_recurse.c | 116 struct symbol *sym = _sym; in has_symbol_helper() local 120 if (expr->symbol == sym) in has_symbol_helper() 125 int has_symbol(struct expression *expr, struct symbol *sym) in has_symbol() argument 127 return recurse(expr, has_symbol_helper, sym, 0); in has_symbol() 133 struct symbol *sym; member 140 struct symbol *sym; in has_var_helper() local 151 name = expr_to_var_sym(expr, &sym); in has_var_helper() 152 if (!name || !sym) in has_var_helper() 154 if (sym == xns->sym && strcmp(name, xns->name) == 0) in has_var_helper() 167 xns.name = expr_to_var_sym(var, &xns.sym); in has_variable() [all …]
|
H A D | smatch_capped.c | 38 set_state(my_id, sm->name, sm->sym, &uncapped); in set_uncapped() 45 state = __get_state(SMATCH_EXTRA, sm->name, sm->sym); in unmatched_state() 128 if (get_state(my_id, name, sym) == &capped) in is_capped_var_sym() 140 set_state(my_id, fullname, sym, &capped); in set_param_capped_data() 243 estate = __get_state(SMATCH_EXTRA, sm->name, sm->sym); in struct_member_callback() 268 param = get_param_num_from_sym(sm->sym); in print_return_implies_capped() 272 estate = __get_state(SMATCH_EXTRA, sm->name, sm->sym); in print_return_implies_capped() 293 if (ret_sym != sm->sym) in print_return_implies_capped() 324 struct symbol *sym; in db_return_states_capped() local 327 if (!name || !sym) in db_return_states_capped() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/lib/libpp/ |
H A D | ppmisc.c | 37 register struct ppsymbol* sym; in pprefmac() local 43 sym = ppsymset(pp.symtab, NiL); in pprefmac() 45 if (sym && ref <= REF_NORMAL) in pprefmac() 48 if (!sym->macro) sym = 0; in pprefmac() 53 …if (ref == REF_IF && sym && (sym->flags & SYM_PREDEFINED) && *name != '_' && !(pp.mode & (HOSTED|I… in pprefmac() 62 return(sym); in pprefmac() 74 register struct ppsymbol* sym; in ppassert() local 109 if (sym = ppsymref(pp.symtab, pred)) in ppassert() 110 sym->flags &= ~SYM_PREDICATE; in ppassert() 122 if (sym = ppsymset(pp.symtab, pred)) in ppassert() [all …]
|
/illumos-gate/usr/src/common/mc/mc-amd/ |
H A D | mcamd_synd.c | 261 mcamd_cksym_decode(struct mcamd_hdl *hdl, uint_t sym, int *lowbitp, in mcamd_cksym_decode() argument 264 if (sym <= 0xf || sym >= 0x10 && sym <= 0x1f) { in mcamd_cksym_decode() 267 *lowbitp = sym * 4; in mcamd_cksym_decode() 268 *hibitp = (sym + 1) * 4 - 1; in mcamd_cksym_decode() 269 } else if (sym >= 0x20 && sym <= 0x23) { in mcamd_cksym_decode() 272 *lowbitp = (sym - 0x20) * 4; in mcamd_cksym_decode() 273 *hibitp = (sym + 1 - 0x20) * 4 - 1; in mcamd_cksym_decode()
|
/illumos-gate/usr/src/cmd/abi/appcert/scripts/ |
H A D | symcheck.pl | 314 $symbols{$sym} = 1; 381 my ($to, $sym, $from, $binary, $line); 442 next if (exists($skip_symbols{$sym})); 446 push(@unbound_list, "$from|$sym"); 722 $model{"$lib|$abi|$sym"} = $class; 1016 my ($app, $caller, $lib, $base, $sym); 1033 push(@profile, "$lib|$sym|$caller"); 1094 $direct_syms{$sym} = 1; 1111 $scoped_msg .= "$base:$sym "; 1210 } elsif ($sym ne '*' && ! $direct_syms{$sym}) { [all …]
|
H A D | symprof.pl | 230 my ($prof, $sym); 238 $sym = $1; 244 "FUNC|$sym\n"; 247 "FUNC|$sym\n"; 962 "$object|$sym\n"; 1150 my ($from, $to, $sym); 1170 $sym = $3; 1175 $sym =~ s/'\s+.*$//; 1179 $sym =~ s/[\s:;`']*$//; 1180 $sym =~ s/^[\s:;`']*//; [all …]
|
/illumos-gate/usr/src/cmd/mdb/common/modules/logindmux/ |
H A D | logindmux.c | 106 GElf_Sym sym; in _mdb_init() local 108 if (mdb_lookup_by_obj("logindmux", "logdmuxuwinit", &sym) == 0) in _mdb_init() 109 mdb_qops_install(&logdmux_uqops, (uintptr_t)sym.st_value); in _mdb_init() 110 if (mdb_lookup_by_obj("logindmux", "logdmuxlwinit", &sym) == 0) in _mdb_init() 111 mdb_qops_install(&logdmux_lqops, (uintptr_t)sym.st_value); in _mdb_init() 119 GElf_Sym sym; in _mdb_fini() local 121 if (mdb_lookup_by_obj("logindmux", "logdmuxuwinit", &sym) == 0) in _mdb_fini() 122 mdb_qops_remove(&logdmux_uqops, (uintptr_t)sym.st_value); in _mdb_fini() 123 if (mdb_lookup_by_obj("logindmux", "logdmuxlwinit", &sym) == 0) in _mdb_fini() 124 mdb_qops_remove(&logdmux_lqops, (uintptr_t)sym.st_value); in _mdb_fini()
|
/illumos-gate/usr/src/cmd/localedef/ |
H A D | charmap.c | 201 srch.name = sym; in add_charmap_impl() 217 if (sym) { in add_charmap_impl() 229 n->name = sym; in add_charmap_impl() 236 add_charmap(const char *sym, int c) in add_charmap() argument 238 add_charmap_impl(sym, c, 1); in add_charmap() 242 add_charmap_undefined(char *sym) in add_charmap_undefined() argument 247 srch.name = sym; in add_charmap_undefined() 251 warn(_("undefined symbol <%s>"), sym); in add_charmap_undefined() 252 add_charmap_impl(sym, -1, 0); in add_charmap_undefined() 254 free(sym); in add_charmap_undefined() [all …]
|
/illumos-gate/usr/src/lib/libdhcputil/common/ |
H A D | dhcp_symbol.c | 651 dhcp_symbol_t *sym) in dsym_init_parser() argument 664 sym->ds_category = 0; in dsym_init_parser() 665 sym->ds_code = 0; in dsym_init_parser() 667 sym->ds_type = 0; in dsym_init_parser() 668 sym->ds_gran = 0; in dsym_init_parser() 669 sym->ds_max = 0; in dsym_init_parser() 670 sym->ds_classes.dc_names = NULL; in dsym_init_parser() 671 sym->ds_classes.dc_cnt = 0; in dsym_init_parser() 743 &sym->ds_classes); in dsym_parse_field() 753 sym->ds_code); in dsym_parse_field() [all …]
|
/illumos-gate/usr/src/tools/scripts/ |
H A D | interface_cmp.pl | 171 my ($SymList, $sym, $ver, $obj) = @_; 175 ($sym =~ /$$ex[0]/); 251 foreach my $sym (keys %$i_symhash) { 339 my $sym = $1; 346 $cur_version->[3]{$sym} = 'NEW'; 440 foreach my $sym (sort keys %$symhash) { 441 print "\t$symhash->{$sym}\t$sym\n"; 508 if (!defined($new_symhash->{$sym})) { 511 "$name: deleted interface: $sym") 513 $sym, $name, $new_obj); [all …]
|
/illumos-gate/usr/src/cmd/sgs/libelf/demo/ |
H A D | dispsyms.c | 132 GElf_Sym sym; in print_symtab() local 144 &sym, &shndx) == NULL) { in print_symtab() 157 if ((sym.st_shndx == SHN_XINDEX) && in print_symtab() 190 &sym, &shndx) == NULL)) { in print_symtab() 212 type = GELF_ST_TYPE(sym.st_info); in print_symtab() 213 bind = GELF_ST_BIND(sym.st_info); in print_symtab() 233 if (sym.st_shndx < SHN_LORESERVE) in print_symtab() 234 shndx = sym.st_shndx; in print_symtab() 235 else if ((sym.st_shndx != SHN_XINDEX) || in print_symtab() 237 shndx = sym.st_shndx; in print_symtab() [all …]
|