mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-29 04:53:56 +08:00
Add mmap casts in linux-btrace.c
gdb/ChangeLog: * linux-btrace.c (linux_enable_pt): Add cast to mmap return.
This commit is contained in:
parent
6ecf4e06a4
commit
a55515eecb
@ -1,3 +1,7 @@
|
|||||||
|
2015-10-23 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* linux-btrace.c (linux_enable_pt): Add cast to mmap return.
|
||||||
|
|
||||||
2015-10-23 Simon Marchi <simon.marchi@ericsson.com>
|
2015-10-23 Simon Marchi <simon.marchi@ericsson.com>
|
||||||
|
|
||||||
* observer.h (observer_${event}_notification_stub): Add cast.
|
* observer.h (observer_${event}_notification_stub): Add cast.
|
||||||
|
@ -820,8 +820,9 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf)
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* Allocate the configuration page. */
|
/* Allocate the configuration page. */
|
||||||
header = mmap (NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
|
header = ((struct perf_event_mmap_page *)
|
||||||
pt->file, 0);
|
mmap (NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
|
||||||
|
pt->file, 0));
|
||||||
if (header == MAP_FAILED)
|
if (header == MAP_FAILED)
|
||||||
goto err_file;
|
goto err_file;
|
||||||
|
|
||||||
@ -862,8 +863,9 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf)
|
|||||||
header->aux_size = data_size;
|
header->aux_size = data_size;
|
||||||
length = size;
|
length = size;
|
||||||
|
|
||||||
pt->pt.mem = mmap (NULL, length, PROT_READ, MAP_SHARED, pt->file,
|
pt->pt.mem = ((const uint8_t *)
|
||||||
header->aux_offset);
|
mmap (NULL, length, PROT_READ, MAP_SHARED, pt->file,
|
||||||
|
header->aux_offset));
|
||||||
if (pt->pt.mem != MAP_FAILED)
|
if (pt->pt.mem != MAP_FAILED)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user