1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-07-01 05:31:43 +02:00

Reformat os-freebsd.c.

This commit is contained in:
Konstantin Belousov 2010-04-03 23:29:28 +03:00
parent 5715d912f4
commit bd2798805a

View file

@ -31,7 +31,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "libunwind_i.h" #include "libunwind_i.h"
int PROTECTED int
tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip, tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip,
unsigned long *segbase, unsigned long *mapoff) unsigned long *segbase, unsigned long *mapoff)
{ {
@ -41,11 +41,13 @@ tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip,
freep = kinfo_getvmmap(pid, &cnt); freep = kinfo_getvmmap(pid, &cnt);
if (freep == NULL) if (freep == NULL)
return (-1); return (-1);
for (i = 0; i < cnt; i++) { for (i = 0; i < cnt; i++)
{
kve = &freep[i]; kve = &freep[i];
if (ip < kve->kve_start || ip >= kve->kve_end) if (ip < kve->kve_start || ip >= kve->kve_end)
continue; continue;
if (kve->kve_type != KVME_TYPE_VNODE) { if (kve->kve_type != KVME_TYPE_VNODE)
{
free(freep); free(freep);
return (-1); return (-1);
} }