Module.h revision 1dca63469790d5dc677e4aa99403c3c72b97634d
1//===-- Module.h ------------------------------------------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef liblldb_Module_h_
11#define liblldb_Module_h_
12
13#include "lldb/Core/ArchSpec.h"
14#include "lldb/Core/Section.h"
15#include "lldb/Core/UUID.h"
16#include "lldb/Symbol/ObjectFile.h"
17#include "lldb/Host/Mutex.h"
18#include "lldb/Host/TimeValue.h"
19#include "lldb/Symbol/ClangASTContext.h"
20#include "lldb/Symbol/CompileUnit.h"
21#include "lldb/Symbol/SymbolContext.h"
22#include "lldb/Symbol/Symtab.h"
23#include "lldb/Symbol/TypeList.h"
24
25//----------------------------------------------------------------------
26/// @class Module Module.h "lldb/Core/Module.h"
27/// @brief A class that describes an executable image and its associated
28///        object and symbol files.
29///
30/// The module is designed to be able to select a single slice of an
31/// executable image as it would appear on disk and during program
32/// execution.
33///
34/// Modules control when and if information is parsed according to which
35/// accessors are called. For example the object file (ObjectFile)
36/// representation will only be parsed if the object file is requested
37/// using the Module::GetObjectFile() is called. The debug symbols
38/// will only be parsed if the symbol vendor (SymbolVendor) is
39/// requested using the Module::GetSymbolVendor() is called.
40///
41/// The module will parse more detailed information as more queries are
42/// made.
43//----------------------------------------------------------------------
44namespace lldb_private {
45
46class Module :
47    public ReferenceCountedBaseVirtual<Module>,
48    public SymbolContextScope
49{
50public:
51    friend class ModuleList;
52    friend bool ObjectFile::SetModulesArchitecture (const ArchSpec &new_arch);
53
54	// Static functions that can track the lifetime of moodule objects.
55	// This is handy because we might have Module objects that are in
56	// shared pointers that aren't in the global module list (from
57	// ModuleList). If this is the case we need to know about it.
58    // The modules in the global list maintained by these functions
59    // can be viewed using the "target modules list" command using the
60    // "--global" (-g for short).
61    static size_t
62    GetNumberAllocatedModules ();
63
64    static Module *
65    GetAllocatedModuleAtIndex (size_t idx);
66
67    static Mutex &
68    GetAllocationModuleCollectionMutex();
69
70    //------------------------------------------------------------------
71    /// Construct with file specification and architecture.
72    ///
73    /// Clients that wish to share modules with other targets should
74    /// use ModuleList::GetSharedModule().
75    ///
76    /// @param[in] file_spec
77    ///     The file specification for the on disk repesentation of
78    ///     this executable image.
79    ///
80    /// @param[in] arch
81    ///     The architecture to set as the current architecture in
82    ///     this module.
83    ///
84    /// @param[in] object_name
85    ///     The name of an object in a module used to extract a module
86    ///     within a module (.a files and modules that contain multiple
87    ///     architectures).
88    ///
89    /// @param[in] object_offset
90    ///     The offset within an existing module used to extract a
91    ///     module within a module (.a files and modules that contain
92    ///     multiple architectures).
93    //------------------------------------------------------------------
94    Module (const FileSpec& file_spec,
95            const ArchSpec& arch,
96            const ConstString *object_name = NULL,
97            off_t object_offset = 0);
98
99    //------------------------------------------------------------------
100    /// Destructor.
101    //------------------------------------------------------------------
102    virtual
103    ~Module ();
104
105    //------------------------------------------------------------------
106    /// @copydoc SymbolContextScope::CalculateSymbolContext(SymbolContext*)
107    ///
108    /// @see SymbolContextScope
109    //------------------------------------------------------------------
110    virtual void
111    CalculateSymbolContext (SymbolContext* sc);
112
113    virtual Module *
114    CalculateSymbolContextModule ();
115
116    void
117    GetDescription (Stream *s);
118
119    //------------------------------------------------------------------
120    /// Dump a description of this object to a Stream.
121    ///
122    /// Dump a description of the contents of this object to the
123    /// supplied stream \a s. The dumped content will be only what has
124    /// been loaded or parsed up to this point at which this function
125    /// is called, so this is a good way to see what has been parsed
126    /// in a module.
127    ///
128    /// @param[in] s
129    ///     The stream to which to dump the object descripton.
130    //------------------------------------------------------------------
131    void
132    Dump (Stream *s);
133
134    //------------------------------------------------------------------
135    /// @copydoc SymbolContextScope::DumpSymbolContext(Stream*)
136    ///
137    /// @see SymbolContextScope
138    //------------------------------------------------------------------
139    virtual void
140    DumpSymbolContext (Stream *s);
141
142    //------------------------------------------------------------------
143    /// Find a symbol in the object files symbol table.
144    ///
145    /// @param[in] name
146    ///     The name of the symbol that we are looking for.
147    ///
148    /// @param[in] symbol_type
149    ///     If set to eSymbolTypeAny, find a symbol of any type that
150    ///     has a name that matches \a name. If set to any other valid
151    ///     SymbolType enumeration value, then search only for
152    ///     symbols that match \a symbol_type.
153    ///
154    /// @return
155    ///     Returns a valid symbol pointer if a symbol was found,
156    ///     NULL otherwise.
157    //------------------------------------------------------------------
158    const Symbol *
159    FindFirstSymbolWithNameAndType (const ConstString &name,
160                                    lldb::SymbolType symbol_type = lldb::eSymbolTypeAny);
161
162    size_t
163    FindSymbolsWithNameAndType (const ConstString &name,
164                                lldb::SymbolType symbol_type,
165                                SymbolContextList &sc_list);
166
167    size_t
168    FindSymbolsMatchingRegExAndType (const RegularExpression &regex,
169                                     lldb::SymbolType symbol_type,
170                                     SymbolContextList &sc_list);
171
172    //------------------------------------------------------------------
173    /// Find compile units by partial or full path.
174    ///
175    /// Finds all compile units that match \a path in all of the modules
176    /// and returns the results in \a sc_list.
177    ///
178    /// @param[in] path
179    ///     The name of the function we are looking for.
180    ///
181    /// @param[in] append
182    ///     If \b true, then append any compile units that were found
183    ///     to \a sc_list. If \b false, then the \a sc_list is cleared
184    ///     and the contents of \a sc_list are replaced.
185    ///
186    /// @param[out] sc_list
187    ///     A symbol context list that gets filled in with all of the
188    ///     matches.
189    ///
190    /// @return
191    ///     The number of matches added to \a sc_list.
192    //------------------------------------------------------------------
193    uint32_t
194    FindCompileUnits (const FileSpec &path,
195                      bool append,
196                      SymbolContextList &sc_list);
197
198
199    //------------------------------------------------------------------
200    /// Find functions by name.
201    ///
202    /// If the function is an inlined function, it will have a block,
203    /// representing the inlined function, and the function will be the
204    /// containing function.  If it is not inlined, then the block will
205    /// be NULL.
206    ///
207    /// @param[in] name
208    ///     The name of the compile unit we are looking for.
209    ///
210    /// @param[in] name_type_mask
211    ///     A bit mask of bits that indicate what kind of names should
212    ///     be used when doing the lookup. Bits include fully qualified
213    ///     names, base names, C++ methods, or ObjC selectors.
214    ///     See FunctionNameType for more details.
215    ///
216    /// @param[in] append
217    ///     If \b true, any matches will be appended to \a sc_list, else
218    ///     matches replace the contents of \a sc_list.
219    ///
220    /// @param[out] sc_list
221    ///     A symbol context list that gets filled in with all of the
222    ///     matches.
223    ///
224    /// @return
225    ///     The number of matches added to \a sc_list.
226    //------------------------------------------------------------------
227    uint32_t
228    FindFunctions (const ConstString &name,
229                   uint32_t name_type_mask,
230                   bool symbols_ok,
231                   bool append,
232                   SymbolContextList& sc_list);
233
234    //------------------------------------------------------------------
235    /// Find functions by name.
236    ///
237    /// If the function is an inlined function, it will have a block,
238    /// representing the inlined function, and the function will be the
239    /// containing function.  If it is not inlined, then the block will
240    /// be NULL.
241    ///
242    /// @param[in] regex
243    ///     A regular expression to use when matching the name.
244    ///
245    /// @param[in] append
246    ///     If \b true, any matches will be appended to \a sc_list, else
247    ///     matches replace the contents of \a sc_list.
248    ///
249    /// @param[out] sc_list
250    ///     A symbol context list that gets filled in with all of the
251    ///     matches.
252    ///
253    /// @return
254    ///     The number of matches added to \a sc_list.
255    //------------------------------------------------------------------
256    uint32_t
257    FindFunctions (const RegularExpression& regex,
258                   bool symbols_ok,
259                   bool append,
260                   SymbolContextList& sc_list);
261
262    //------------------------------------------------------------------
263    /// Find global and static variables by name.
264    ///
265    /// @param[in] name
266    ///     The name of the global or static variable we are looking
267    ///     for.
268    ///
269    /// @param[in] append
270    ///     If \b true, any matches will be appended to \a
271    ///     variable_list, else matches replace the contents of
272    ///     \a variable_list.
273    ///
274    /// @param[in] max_matches
275    ///     Allow the number of matches to be limited to \a
276    ///     max_matches. Specify UINT32_MAX to get all possible matches.
277    ///
278    /// @param[in] variable_list
279    ///     A list of variables that gets the matches appended to (if
280    ///     \a append it \b true), or replace (if \a append is \b false).
281    ///
282    /// @return
283    ///     The number of matches added to \a variable_list.
284    //------------------------------------------------------------------
285    uint32_t
286    FindGlobalVariables (const ConstString &name,
287                         bool append,
288                         uint32_t max_matches,
289                         VariableList& variable_list);
290
291    //------------------------------------------------------------------
292    /// Find global and static variables by regular exression.
293    ///
294    /// @param[in] regex
295    ///     A regular expression to use when matching the name.
296    ///
297    /// @param[in] append
298    ///     If \b true, any matches will be appended to \a
299    ///     variable_list, else matches replace the contents of
300    ///     \a variable_list.
301    ///
302    /// @param[in] max_matches
303    ///     Allow the number of matches to be limited to \a
304    ///     max_matches. Specify UINT32_MAX to get all possible matches.
305    ///
306    /// @param[in] variable_list
307    ///     A list of variables that gets the matches appended to (if
308    ///     \a append it \b true), or replace (if \a append is \b false).
309    ///
310    /// @return
311    ///     The number of matches added to \a variable_list.
312    //------------------------------------------------------------------
313    uint32_t
314    FindGlobalVariables (const RegularExpression& regex,
315                         bool append,
316                         uint32_t max_matches,
317                         VariableList& variable_list);
318
319    //------------------------------------------------------------------
320    /// Find types by name.
321    ///
322    /// @param[in] sc
323    ///     A symbol context that scopes where to extract a type list
324    ///     from.
325    ///
326    /// @param[in] name
327    ///     The name of the type we are looking for.
328    ///
329    /// @param[in] append
330    ///     If \b true, any matches will be appended to \a
331    ///     variable_list, else matches replace the contents of
332    ///     \a variable_list.
333    ///
334    /// @param[in] max_matches
335    ///     Allow the number of matches to be limited to \a
336    ///     max_matches. Specify UINT32_MAX to get all possible matches.
337    ///
338    /// @param[in] encoding
339    ///     Limit the search to specific types, or get all types if
340    ///     set to Type::invalid.
341    ///
342    /// @param[in] udt_name
343    ///     If the encoding is a user defined type, specify the name
344    ///     of the user defined type ("struct", "union", "class", etc).
345    ///
346    /// @param[out] type_list
347    ///     A type list gets populated with any matches.
348    ///
349    /// @return
350    ///     The number of matches added to \a type_list.
351    //------------------------------------------------------------------
352    uint32_t
353    FindTypes (const SymbolContext& sc,
354               const ConstString &name,
355               bool append,
356               uint32_t max_matches,
357               TypeList& types);
358
359    //------------------------------------------------------------------
360    /// Get const accessor for the module architecture.
361    ///
362    /// @return
363    ///     A const reference to the architecture object.
364    //------------------------------------------------------------------
365    const ArchSpec&
366    GetArchitecture () const;
367
368    //------------------------------------------------------------------
369    /// Get const accessor for the module file specification.
370    ///
371    /// This function returns the file for the module on the host system
372    /// that is running LLDB. This can differ from the path on the
373    /// platform since we might be doing remote debugging.
374    ///
375    /// @return
376    ///     A const reference to the file specification object.
377    //------------------------------------------------------------------
378    const FileSpec &
379    GetFileSpec () const
380    {
381        return m_file;
382    }
383
384    //------------------------------------------------------------------
385    /// Get accessor for the module platform file specification.
386    ///
387    /// Platform file refers to the path of the module as it is known on
388    /// the remote system on which it is being debugged. For local
389    /// debugging this is always the same as Module::GetFileSpec(). But
390    /// remote debugging might mention a file "/usr/lib/liba.dylib"
391    /// which might be locally downloaded and cached. In this case the
392    /// platform file could be something like:
393    /// "/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib"
394    /// The file could also be cached in a local developer kit directory.
395    ///
396    /// @return
397    ///     A const reference to the file specification object.
398    //------------------------------------------------------------------
399    const FileSpec &
400    GetPlatformFileSpec () const
401    {
402        if (m_platform_file)
403            return m_platform_file;
404        return m_file;
405    }
406
407    void
408    SetPlatformFileSpec (const FileSpec &file)
409    {
410        m_platform_file = file;
411    }
412
413    const TimeValue &
414    GetModificationTime () const;
415
416    //------------------------------------------------------------------
417    /// Tells whether this module is capable of being the main executable
418    /// for a process.
419    ///
420    /// @return
421    ///     \b true if it is, \b false otherwise.
422    //------------------------------------------------------------------
423    bool
424    IsExecutable ();
425
426    //------------------------------------------------------------------
427    /// Tells whether this module has been loaded in the target passed in.
428    /// This call doesn't distinguish between whether the module is loaded
429    /// by the dynamic loader, or by a "target module add" type call.
430    ///
431    /// @param[in] target
432    ///    The target to check whether this is loaded in.
433    ///
434    /// @return
435    ///     \b true if it is, \b false otherwise.
436    //------------------------------------------------------------------
437    bool
438    IsLoadedInTarget (Target *target);
439
440    //------------------------------------------------------------------
441    /// Get the number of compile units for this module.
442    ///
443    /// @return
444    ///     The number of compile units that the symbol vendor plug-in
445    ///     finds.
446    //------------------------------------------------------------------
447    uint32_t
448    GetNumCompileUnits();
449
450    lldb::CompUnitSP
451    GetCompileUnitAtIndex (uint32_t);
452
453    const ConstString &
454    GetObjectName() const;
455
456    uint64_t
457    GetObjectOffset() const
458    {
459        return m_object_offset;
460    }
461
462    //------------------------------------------------------------------
463    /// Get the object file representation for the current architecture.
464    ///
465    /// If the object file has not been located or parsed yet, this
466    /// function will find the best ObjectFile plug-in that can parse
467    /// Module::m_file.
468    ///
469    /// @return
470    ///     If Module::m_file does not exist, or no plug-in was found
471    ///     that can parse the file, or the object file doesn't contain
472    ///     the current architecture in Module::m_arch, NULL will be
473    ///     returned, else a valid object file interface will be
474    ///     returned. The returned pointer is owned by this object and
475    ///     remains valid as long as the object is around.
476    //------------------------------------------------------------------
477    ObjectFile *
478    GetObjectFile ();
479
480    //------------------------------------------------------------------
481    /// Get the symbol vendor interface for the current architecture.
482    ///
483    /// If the symbol vendor file has not been located yet, this
484    /// function will find the best SymbolVendor plug-in that can
485    /// use the current object file.
486    ///
487    /// @return
488    ///     If this module does not have a valid object file, or no
489    ///     plug-in can be found that can use the object file, NULL will
490    ///     be returned, else a valid symbol vendor plug-in interface
491    ///     will be returned. The returned pointer is owned by this
492    ///     object and remains valid as long as the object is around.
493    //------------------------------------------------------------------
494    SymbolVendor*
495    GetSymbolVendor(bool can_create = true);
496
497    //------------------------------------------------------------------
498    /// Get accessor the type list for this module.
499    ///
500    /// @return
501    ///     A valid type list pointer, or NULL if there is no valid
502    ///     symbol vendor for this module.
503    //------------------------------------------------------------------
504    TypeList*
505    GetTypeList ();
506
507    //------------------------------------------------------------------
508    /// Get a pointer to the UUID value contained in this object.
509    ///
510    /// If the executable image file doesn't not have a UUID value built
511    /// into the file format, an MD5 checksum of the entire file, or
512    /// slice of the file for the current architecture should be used.
513    ///
514    /// @return
515    ///     A const pointer to the internal copy of the UUID value in
516    ///     this module if this module has a valid UUID value, NULL
517    ///     otherwise.
518    //------------------------------------------------------------------
519    const lldb_private::UUID &
520    GetUUID ();
521
522    //------------------------------------------------------------------
523    /// A debugging function that will cause everything in a module to
524    /// be parsed.
525    ///
526    /// All compile units will be pasred, along with all globals and
527    /// static variables and all functions for those compile units.
528    /// All types, scopes, local variables, static variables, global
529    /// variables, and line tables will be parsed. This can be used
530    /// prior to dumping a module to see a complete list of the
531    /// resuling debug information that gets parsed, or as a debug
532    /// function to ensure that the module can consume all of the
533    /// debug data the symbol vendor provides.
534    //------------------------------------------------------------------
535    void
536    ParseAllDebugSymbols();
537
538    bool
539    ResolveFileAddress (lldb::addr_t vm_addr, Address& so_addr);
540
541    uint32_t
542    ResolveSymbolContextForAddress (const Address& so_addr, uint32_t resolve_scope, SymbolContext& sc);
543
544    //------------------------------------------------------------------
545    /// Resolve items in the symbol context for a given file and line.
546    ///
547    /// Tries to resolve \a file_path and \a line to a list of matching
548    /// symbol contexts.
549    ///
550    /// The line table entries contains addresses that can be used to
551    /// further resolve the values in each match: the function, block,
552    /// symbol. Care should be taken to minimize the amount of
553    /// information that is requested to only what is needed --
554    /// typically the module, compile unit, line table and line table
555    /// entry are sufficient.
556    ///
557    /// @param[in] file_path
558    ///     A path to a source file to match. If \a file_path does not
559    ///     specify a directory, then this query will match all files
560    ///     whose base filename matches. If \a file_path does specify
561    ///     a directory, the fullpath to the file must match.
562    ///
563    /// @param[in] line
564    ///     The source line to match, or zero if just the compile unit
565    ///     should be resolved.
566    ///
567    /// @param[in] check_inlines
568    ///     Check for inline file and line number matches. This option
569    ///     should be used sparingly as it will cause all line tables
570    ///     for every compile unit to be parsed and searched for
571    ///     matching inline file entries.
572    ///
573    /// @param[in] resolve_scope
574    ///     The scope that should be resolved (see
575    ///     SymbolContext::Scope).
576    ///
577    /// @param[out] sc_list
578    ///     A symbol context list that gets matching symbols contexts
579    ///     appended to.
580    ///
581    /// @return
582    ///     The number of matches that were added to \a sc_list.
583    ///
584    /// @see SymbolContext::Scope
585    //------------------------------------------------------------------
586    uint32_t
587    ResolveSymbolContextForFilePath (const char *file_path, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list);
588
589    //------------------------------------------------------------------
590    /// Resolve items in the symbol context for a given file and line.
591    ///
592    /// Tries to resolve \a file_spec and \a line to a list of matching
593    /// symbol contexts.
594    ///
595    /// The line table entries contains addresses that can be used to
596    /// further resolve the values in each match: the function, block,
597    /// symbol. Care should be taken to minimize the amount of
598    /// information that is requested to only what is needed --
599    /// typically the module, compile unit, line table and line table
600    /// entry are sufficient.
601    ///
602    /// @param[in] file_spec
603    ///     A file spec to a source file to match. If \a file_path does
604    ///     not specify a directory, then this query will match all
605    ///     files whose base filename matches. If \a file_path does
606    ///     specify a directory, the fullpath to the file must match.
607    ///
608    /// @param[in] line
609    ///     The source line to match, or zero if just the compile unit
610    ///     should be resolved.
611    ///
612    /// @param[in] check_inlines
613    ///     Check for inline file and line number matches. This option
614    ///     should be used sparingly as it will cause all line tables
615    ///     for every compile unit to be parsed and searched for
616    ///     matching inline file entries.
617    ///
618    /// @param[in] resolve_scope
619    ///     The scope that should be resolved (see
620    ///     SymbolContext::Scope).
621    ///
622    /// @param[out] sc_list
623    ///     A symbol context list that gets filled in with all of the
624    ///     matches.
625    ///
626    /// @return
627    ///     A integer that contains SymbolContext::Scope bits set for
628    ///     each item that was successfully resolved.
629    ///
630    /// @see SymbolContext::Scope
631    //------------------------------------------------------------------
632    uint32_t
633    ResolveSymbolContextsForFileSpec (const FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list);
634
635
636    void
637    SetFileSpecAndObjectName (const FileSpec &file,
638                              const ConstString &object_name);
639
640    bool
641    GetIsDynamicLinkEditor () const
642    {
643        return m_is_dynamic_loader_module;
644    }
645
646    void
647    SetIsDynamicLinkEditor (bool b)
648    {
649        m_is_dynamic_loader_module = b;
650    }
651
652    ClangASTContext &
653    GetClangASTContext ();
654
655protected:
656    //------------------------------------------------------------------
657    // Member Variables
658    //------------------------------------------------------------------
659    mutable Mutex               m_mutex;        ///< A mutex to keep this object happy in multi-threaded environments.
660    TimeValue                   m_mod_time;     ///< The modification time for this module when it was created.
661    ArchSpec                    m_arch;         ///< The architecture for this module.
662    lldb_private::UUID          m_uuid;         ///< Each module is assumed to have a unique identifier to help match it up to debug symbols.
663    FileSpec                    m_file;         ///< The file representation on disk for this module (if there is one).
664    FileSpec                    m_platform_file;///< The path to the module on the platform on which it is being debugged
665    ConstString                 m_object_name;  ///< The name an object within this module that is selected, or empty of the module is represented by \a m_file.
666    uint64_t                    m_object_offset;
667    lldb::ObjectFileSP          m_objfile_sp;   ///< A shared pointer to the object file parser for this module as it may or may not be shared with the SymbolFile
668    std::auto_ptr<SymbolVendor> m_symfile_ap;   ///< A pointer to the symbol vendor for this module.
669    ClangASTContext             m_ast;          ///< The AST context for this module.
670    bool                        m_did_load_objfile:1,
671                                m_did_load_symbol_vendor:1,
672                                m_did_parse_uuid:1,
673                                m_did_init_ast:1,
674                                m_is_dynamic_loader_module:1;
675
676    //------------------------------------------------------------------
677    /// Resolve a file or load virtual address.
678    ///
679    /// Tries to resolve \a vm_addr as a file address (if \a
680    /// vm_addr_is_file_addr is true) or as a load address if \a
681    /// vm_addr_is_file_addr is false) in the symbol vendor.
682    /// \a resolve_scope indicates what clients wish to resolve
683    /// and can be used to limit the scope of what is parsed.
684    ///
685    /// @param[in] vm_addr
686    ///     The load virtual address to resolve.
687    ///
688    /// @param[in] vm_addr_is_file_addr
689    ///     If \b true, \a vm_addr is a file address, else \a vm_addr
690    ///     if a load address.
691    ///
692    /// @param[in] resolve_scope
693    ///     The scope that should be resolved (see
694    ///     SymbolContext::Scope).
695    ///
696    /// @param[out] so_addr
697    ///     The section offset based address that got resolved if
698    ///     any bits are returned.
699    ///
700    /// @param[out] sc
701    //      The symbol context that has objects filled in. Each bit
702    ///     in the \a resolve_scope pertains to a member in the \a sc.
703    ///
704    /// @return
705    ///     A integer that contains SymbolContext::Scope bits set for
706    ///     each item that was successfully resolved.
707    ///
708    /// @see SymbolContext::Scope
709    //------------------------------------------------------------------
710    uint32_t
711    ResolveSymbolContextForAddress (lldb::addr_t vm_addr,
712                                    bool vm_addr_is_file_addr,
713                                    uint32_t resolve_scope,
714                                    Address& so_addr,
715                                    SymbolContext& sc);
716
717    void
718    SymbolIndicesToSymbolContextList (Symtab *symtab,
719                                      std::vector<uint32_t> &symbol_indexes,
720                                      SymbolContextList &sc_list);
721
722    bool
723    SetArchitecture (const ArchSpec &new_arch);
724
725private:
726
727    uint32_t
728    FindTypes_Impl (const SymbolContext& sc,
729                    const ConstString &name,
730                    bool append,
731                    uint32_t max_matches,
732                    TypeList& types);
733
734
735    DISALLOW_COPY_AND_ASSIGN (Module);
736};
737
738} // namespace lldb_private
739
740#endif  // liblldb_Module_h_
741