xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/objfile-flags.h (revision 6881a4007f077b54e5f51159c52b9b25f57deb0d)
1699b0f92Schristos /* Definition of objfile flags.
2699b0f92Schristos 
3*6881a400Schristos    Copyright (C) 1992-2023 Free Software Foundation, Inc.
4699b0f92Schristos 
5699b0f92Schristos    This file is part of GDB.
6699b0f92Schristos 
7699b0f92Schristos    This program is free software; you can redistribute it and/or modify
8699b0f92Schristos    it under the terms of the GNU General Public License as published by
9699b0f92Schristos    the Free Software Foundation; either version 3 of the License, or
10699b0f92Schristos    (at your option) any later version.
11699b0f92Schristos 
12699b0f92Schristos    This program is distributed in the hope that it will be useful,
13699b0f92Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
14699b0f92Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15699b0f92Schristos    GNU General Public License for more details.
16699b0f92Schristos 
17699b0f92Schristos    You should have received a copy of the GNU General Public License
18699b0f92Schristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19699b0f92Schristos 
20699b0f92Schristos #if !defined (OBJFILE_FLAGS_H)
21699b0f92Schristos #define OBJFILE_FLAGS_H
22699b0f92Schristos 
237d62b00eSchristos #include "gdbsupport/enum-flags.h"
24699b0f92Schristos 
25699b0f92Schristos /* Defines for the objfile flags field.  Defined in a separate file to
26699b0f92Schristos    break circular header dependencies.  */
27699b0f92Schristos 
287f2ac410Schristos enum objfile_flag : unsigned
29699b0f92Schristos   {
30699b0f92Schristos     /* When an object file has its functions reordered (currently
31699b0f92Schristos        Irix-5.2 shared libraries exhibit this behaviour), we will need
32699b0f92Schristos        an expensive algorithm to locate a partial symtab or symtab via
33699b0f92Schristos        an address.  To avoid this penalty for normal object files, we
34699b0f92Schristos        use this flag, whose setting is determined upon symbol table
35699b0f92Schristos        read in.  */
36699b0f92Schristos     OBJF_REORDERED = 1 << 0,	/* Functions are reordered */
37699b0f92Schristos 
38699b0f92Schristos     /* Distinguish between an objfile for a shared library and a
39699b0f92Schristos        "vanilla" objfile.  This may come from a target's
40699b0f92Schristos        implementation of the solib interface, from add-symbol-file, or
41699b0f92Schristos        any other mechanism that loads dynamic objects.  */
42699b0f92Schristos     OBJF_SHARED = 1 << 1,	/* From a shared library */
43699b0f92Schristos 
44699b0f92Schristos     /* User requested that this objfile be read in it's entirety.  */
45699b0f92Schristos     OBJF_READNOW = 1 << 2,	/* Immediate full read */
46699b0f92Schristos 
47699b0f92Schristos     /* This objfile was created because the user explicitly caused it
48699b0f92Schristos        (e.g., used the add-symbol-file command).  This bit offers a
49699b0f92Schristos        way for run_command to remove old objfile entries which are no
50699b0f92Schristos        longer valid (i.e., are associated with an old inferior), but
51699b0f92Schristos        to preserve ones that the user explicitly loaded via the
52699b0f92Schristos        add-symbol-file command.  */
53699b0f92Schristos     OBJF_USERLOADED = 1 << 3,	/* User loaded */
54699b0f92Schristos 
55699b0f92Schristos     /* Set if we have tried to read partial symtabs for this objfile.
56699b0f92Schristos        This is used to allow lazy reading of partial symtabs.  */
57699b0f92Schristos     OBJF_PSYMTABS_READ = 1 << 4,
58699b0f92Schristos 
59699b0f92Schristos     /* Set if this is the main symbol file (as opposed to symbol file
60699b0f92Schristos        for dynamically loaded code).  */
61699b0f92Schristos     OBJF_MAINLINE = 1 << 5,
62699b0f92Schristos 
63699b0f92Schristos     /* ORIGINAL_NAME and OBFD->FILENAME correspond to text description
64699b0f92Schristos        unrelated to filesystem names.  It can be for example
65699b0f92Schristos        "<image in memory>".  */
66699b0f92Schristos     OBJF_NOT_FILENAME = 1 << 6,
677f2ac410Schristos 
687f2ac410Schristos     /* User requested that we do not read this objfile's symbolic
697f2ac410Schristos        information.  */
707f2ac410Schristos     OBJF_READNEVER = 1 << 7,
71699b0f92Schristos   };
72699b0f92Schristos 
73699b0f92Schristos DEF_ENUM_FLAGS_TYPE (enum objfile_flag, objfile_flags);
74699b0f92Schristos 
75699b0f92Schristos #endif /* !defined (OBJFILE_FLAGS_H) */
76