Update year range in copyright notice of binutils files
[binutils-gdb.git] / gprofng / src / SegMem.h
blob1df3039477efa35b649bcaaddd0fcbfa6923fba6
1 /* Copyright (C) 2021-2024 Free Software Foundation, Inc.
2 Contributed by Oracle.
4 This file is part of GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
21 #ifndef _SEGMEM_H
22 #define _SEGMEM_H
24 #include "dbe_types.h"
25 class Histable;
27 class SegMem
29 public:
31 // The various segments types.
32 enum Seg_mode
34 READ,
35 WRITE,
36 EXEC,
37 UNKNOWN
40 void
41 set_file_offset (uint64_t fo)
43 file_offset = fo;
46 uint64_t
47 get_file_offset ()
49 return file_offset;
52 void
53 set_mode (Seg_mode sm)
55 mode = sm;
58 Seg_mode
59 get_mode ()
61 return mode;
64 Size size; // Size of this instance
65 Histable *obj; // Pointer to Segment/Function object
66 Vaddr base; // Base address
67 hrtime_t load_time;
68 hrtime_t unload_time;
69 Size page_size;
71 private:
72 uint64_t file_offset;
73 Seg_mode mode;
76 #endif /* _SEGMEM_H */