/* Return sibling of given DIE. Copyright (C) 2003-2010 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. This file is free software; you can redistribute it and/or modify it under the terms of either * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version or * the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version or both in parallel, as here. elfutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received copies of the GNU General Public License and the GNU Lesser General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include #endif #include "libdwP.h" #include #include int dwarf_siblingof (die, result) Dwarf_Die *die; Dwarf_Die *result; { /* Ignore previous errors. */ if (die == NULL) return -1; if (result == NULL) return -1; if (result != die) result->addr = NULL; unsigned int level = 0; /* Copy of the current DIE. */ Dwarf_Die this_die = *die; /* Temporary attributes we create. */ Dwarf_Attribute sibattr; /* Copy of the CU in the request. */ sibattr.cu = this_die.cu; /* That's the address we start looking. */ unsigned char *addr = this_die.addr; /* End of the buffer. */ unsigned char *endp = ((unsigned char *) cu_data (sibattr.cu)->d_buf + sibattr.cu->end); /* Search for the beginning of the next die on this level. We must not return the dies for children of the given die. */ do { /* Find the end of the DIE or the sibling attribute. */ addr = __libdw_find_attr (&this_die, DW_AT_sibling, &sibattr.code, &sibattr.form); if (sibattr.code == DW_AT_sibling) { Dwarf_Off offset; sibattr.valp = addr; if (unlikely (__libdw_formref (&sibattr, &offset) != 0)) /* Something went wrong. */ return -1; /* Compute the next address. */ addr = ((unsigned char *) cu_data (sibattr.cu)->d_buf + sibattr.cu->start + offset); } else if (unlikely (addr == NULL) || unlikely (this_die.abbrev == DWARF_END_ABBREV)) return -1; else if (this_die.abbrev->has_children) /* This abbreviation has children. */ ++level; while (1) { /* Make sure we are still in range. Some producers might skip the trailing NUL bytes. */ if (addr >= endp) return 1; if (*addr != '\0') break; if (level-- == 0) { if (result != die) result->addr = addr; /* No more sibling at all. */ return 1; } ++addr; } /* Initialize the 'current DIE'. */ this_die.addr = addr; this_die.abbrev = NULL; } while (level > 0); /* Maybe we reached the end of the CU. */ if (addr >= endp) return 1; /* Clear the entire DIE structure. This signals we have not yet determined any of the information. */ memset (result, '\0', sizeof (Dwarf_Die)); /* We have the address. */ result->addr = addr; /* Same CU as the parent. */ result->cu = sibattr.cu; return 0; } INTDEF(dwarf_siblingof) ion> Qt Base (Core, Gui, Widgets, Network, ...)
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Martins <sergio.martins.qnx@kdab.com>2013-01-15 09:08:14 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-17 15:55:18 +0100
commit64439ed92a88554ec2f277970620de3e9abf2ad0 (patch)
tree8c18fd721fa71651104f32786d01d9c349114431 /src/concurrent/qtconcurrentmapkernel.h
parent170bf2a59aa863e724097825e5a0c8e8148ce109 (diff)
QNX: Don't use native file dialogs.
They are not supported anymore. Use the standard Qt dialogs instead. Change-Id: I2b6c7688e24e4345a95d3a9a062f9670cb1a845f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Bernd Weimer <bweimer@rim.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/concurrent/qtconcurrentmapkernel.h')
0 files changed, 0 insertions, 0 deletions