• Home
  • Raw
  • Download

Lines Matching +full:- +full:print +full:- +full:file +full:- +full:name

5 # Read "nm -o" input of a set of libraries or modules and print various
8 # - which names are used but not defined in the set (and used where),
9 # - which names are defined in the set (and where),
10 # - which modules use which other modules,
11 # - which modules are used by which other modules.
13 # Usage: objgraph [-cdu] [file] ...
14 # -c: print callers per objectfile
15 # -d: print callees per objectfile
16 # -u: print usage of undefined symbols
17 # If none of -cdu is specified, all are assumed.
18 # Use "nm -o" to generate the input
19 # e.g.: nm -o /lib/libc.a | objgraph
33 # Regular expression to parse "nm -o" output.
63 # Read one input file and merge the data into the tables.
64 # Argument is an open file.
75 fn, name, type = s[r1a:r1b], s[r3a:r3b], s[r2a:r2b]
77 store(def2file, name, fn)
78 store(file2def, fn, name)
80 store(file2undef, fn, name)
81 store(undef2file, name, fn)
83 print(fn + ':' + name + ': unknown type ' + type)
85 # Print all names that were undefined in some module and where they are
91 print(filename + ':')
100 print('\t' + ext + tabs + ' *undefined')
102 print('\t' + ext + tabs + flat(def2file[ext]))
104 # Print for each module the names of the other modules that use it.
115 print(filename + ':')
119 print('\t' + fn)
122 print(filename + ': unused')
124 # Print undefined names and where they are used.
134 print(ext + ':')
137 print('\t' + filename)
139 # Print warning messages about names defined in more than one file.
145 for name in names:
146 if len(def2file[name]) > 1:
147 print('warning:', name, 'multiply defined:', end=' ')
148 print(flat(def2file[name]))
158 print('Usage:', os.path.basename(sys.argv[0]), end=' ')
159 print('[-cdu] [file] ...')
160 print('-c: print callers per objectfile')
161 print('-d: print callees per objectfile')
162 print('-u: print usage of undefined symbols')
163 print('If none of -cdu is specified, all are assumed.')
164 print('Use "nm -o" to generate the input')
165 print('e.g.: nm -o /lib/libc.a | objgraph')
169 if opt == '-u':
171 elif opt == '-c':
173 elif opt == '-d':
178 args = ['-']
180 if filename == '-':
191 print('---------------All callees------------------')
195 print('---------------Undefined callees------------')
199 print('---------------All Callers------------------')