Print this page
11972 resync smatch

@@ -72,21 +72,23 @@
                        bb, bb->pos.line, bb->pos.line, bb->pos.pos);
 
 
                 /* List loads and stores */
                 FOR_EACH_PTR(bb->insns, insn) {
+                        if (!insn->bb)
+                                continue;
                         switch(insn->opcode) {
                         case OP_STORE:
-                                if (insn->symbol->type == PSEUDO_SYM) {
-                                  printf("%s store(%s)", s, show_ident(insn->symbol->sym->ident));
+                                if (insn->src->type == PSEUDO_SYM) {
+                                  printf("%s store(%s)", s, show_ident(insn->src->sym->ident));
                                   s = ",";
                                 }
                                 break;
 
                         case OP_LOAD:
-                                if (insn->symbol->type == PSEUDO_SYM) {
-                                  printf("%s load(%s)", s, show_ident(insn->symbol->sym->ident));
+                                if (insn->src->type == PSEUDO_SYM) {
+                                  printf("%s load(%s)", s, show_ident(insn->src->sym->ident));
                                   s = ",";
                                 }
                                 break;
 
                         case OP_RET:

@@ -128,10 +130,12 @@
                         continue;
                 if (!bb->parents && !bb->children && !bb->insns && verbose < 2)
                         continue;
 
                 FOR_EACH_PTR(bb->insns, insn) {
+                        if (!insn->bb)
+                                continue;
                         if (insn->opcode == OP_CALL &&
                             internal == !(insn->func->sym->ctype.modifiers & MOD_EXTERN)) {
 
                                 /* Find the symbol for the callee's definition */
                                 struct symbol * sym;

@@ -170,11 +174,11 @@
         fsyms = sparse_initialize(argc, argv, &filelist);
         concat_symbol_list(fsyms, &all_syms);
 
         /* Linearize all symbols, graph internal basic block
          * structures and intra-file calls */
-        FOR_EACH_PTR_NOTAG(filelist, file) {
+        FOR_EACH_PTR(filelist, file) {
 
                 fsyms = sparse(file);
                 concat_symbol_list(fsyms, &all_syms);
 
                 FOR_EACH_PTR(fsyms, sym) {

@@ -185,18 +189,18 @@
                 FOR_EACH_PTR(fsyms, sym) {
                         if (sym->ep) {
                                 graph_ep(sym->ep);
                                 graph_calls(sym->ep, 1);
                         }
-                } END_FOR_EACH_PTR_NOTAG(sym);
+                } END_FOR_EACH_PTR(sym);
 
-        } END_FOR_EACH_PTR_NOTAG(file);
+        } END_FOR_EACH_PTR(file);
 
         /* Graph inter-file calls */
         FOR_EACH_PTR(all_syms, sym) {
                 if (sym->ep)
                         graph_calls(sym->ep, 0);
-        } END_FOR_EACH_PTR_NOTAG(sym);
+        } END_FOR_EACH_PTR(sym);
 
         printf("}\n");
         return 0;
 }