DATA is 'bfd *' for the core file GDB is creating. */
static int
-gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read,
- int write, int exec, int modified, bool memory_tagged,
+gcore_create_callback (CORE_ADDR vaddr, unsigned long size, bool read,
+ bool write, bool exec, bool modified, bool memory_tagged,
void *data)
{
bfd *obfd = (bfd *) data;
/* If the memory segment has no permissions set, ignore it, otherwise
when we later try to access it for read/write, we'll get an error
or jam the kernel. */
- if (read == 0 && write == 0 && exec == 0 && modified == 0)
+ if (!read && !write && !exec && !modified)
{
if (info_verbose)
gdb_printf ("Ignore segment, %s bytes at %s\n",
return 0;
}
- if (write == 0 && modified == 0 && !solib_keep_data_in_core (vaddr, size))
+ if (!write && !modified && !solib_keep_data_in_core (vaddr, size))
{
/* See if this region of memory lies inside a known file on disk.
If so, we can avoid copying its contents by clearing SEC_LOAD. */
keep:;
}
- if (write == 0)
+ if (!write)
flags |= SEC_READONLY;
if (exec)
static int
gcore_create_memtag_section_callback (CORE_ADDR vaddr, unsigned long size,
- int read, int write, int exec,
- int modified, bool memory_tagged,
+ bool read, bool write, bool exec,
+ bool modified, bool memory_tagged,
void *data)
{
/* Are there memory tags in this particular memory map entry? */
int ret;
ret = (*func) (objsec.addr (), size,
- 1, /* All sections will be readable. */
+ true, /* All sections will be readable. */
(flags & SEC_READONLY) == 0, /* Writable. */
(flags & SEC_CODE) != 0, /* Executable. */
- 1, /* MODIFIED is unknown, pass it as true. */
+ true, /* MODIFIED is unknown, pass it as true. */
false, /* No memory tags in the object file. */
obfd);
if (ret != 0)
/* Make a stack segment. */
if (derive_stack_segment (&temp_bottom, &temp_top))
(*func) (temp_bottom, temp_top - temp_bottom,
- 1, /* Stack section will be readable. */
- 1, /* Stack section will be writable. */
- 0, /* Stack section will not be executable. */
- 1, /* Stack section will be modified. */
+ true, /* Stack section will be readable. */
+ true, /* Stack section will be writable. */
+ false, /* Stack section will not be executable. */
+ true, /* Stack section will be modified. */
false, /* No memory tags in the object file. */
obfd);
if (derive_heap_segment (current_program_space->exec_bfd (), &temp_bottom,
&temp_top))
(*func) (temp_bottom, temp_top - temp_bottom,
- 1, /* Heap section will be readable. */
- 1, /* Heap section will be writable. */
- 0, /* Heap section will not be executable. */
- 1, /* Heap section will be modified. */
+ true, /* Heap section will be readable. */
+ true, /* Heap section will be writable. */
+ false, /* Heap section will not be executable. */
+ true, /* Heap section will be modified. */
false, /* No memory tags in the object file. */
obfd);
typedef int linux_find_memory_region_ftype (ULONGEST vaddr, ULONGEST size,
ULONGEST offset,
- int read, int write,
- int exec, int modified,
+ bool read, bool write,
+ bool exec, bool modified,
bool memory_tagged,
const std::string &filename,
void *data);
{
func (map.start_address, map.end_address - map.start_address,
map.offset, map.read, map.write, map.exec,
- 1, /* MODIFIED is true because we want to dump
+ true, /* MODIFIED is true because we want to dump
the mapping. */
map.vmflags.memory_tagging != 0,
map.filename, obfd);
static int
linux_find_memory_regions_thunk (ULONGEST vaddr, ULONGEST size,
ULONGEST offset,
- int read, int write, int exec, int modified,
- bool memory_tagged,
+ bool read, bool write, bool exec,
+ bool modified, bool memory_tagged,
const std::string &filename, void *arg)
{
struct linux_find_memory_regions_data *data
static int
linux_make_mappings_callback (ULONGEST vaddr, ULONGEST size,
ULONGEST offset,
- int read, int write, int exec, int modified,
+ bool read, bool write, bool exec, bool modified,
bool memory_tagged,
const std::string &filename, void *data)
{