Gput_dynamic_unwind_info.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* libunwind - a platform-independent unwind library
  2. Copyright (C) 2001-2002, 2005 Hewlett-Packard Co
  3. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
  4. This file is part of libunwind.
  5. Permission is hereby granted, free of charge, to any person obtaining
  6. a copy of this software and associated documentation files (the
  7. "Software"), to deal in the Software without restriction, including
  8. without limitation the rights to use, copy, modify, merge, publish,
  9. distribute, sublicense, and/or sell copies of the Software, and to
  10. permit persons to whom the Software is furnished to do so, subject to
  11. the following conditions:
  12. The above copyright notice and this permission notice shall be
  13. included in all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  15. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  16. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  17. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  18. LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  19. OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  20. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  21. #include "libunwind_i.h"
  22. HIDDEN void
  23. unwi_put_dynamic_unwind_info (unw_addr_space_t as, unw_proc_info_t *pi,
  24. void *arg)
  25. {
  26. switch (pi->format)
  27. {
  28. case UNW_INFO_FORMAT_DYNAMIC:
  29. #ifndef UNW_LOCAL_ONLY
  30. # ifdef UNW_REMOTE_ONLY
  31. unwi_dyn_remote_put_unwind_info (as, pi, arg);
  32. # else
  33. if (as != unw_local_addr_space)
  34. unwi_dyn_remote_put_unwind_info (as, pi, arg);
  35. # endif
  36. #endif
  37. break;
  38. case UNW_INFO_FORMAT_TABLE:
  39. case UNW_INFO_FORMAT_REMOTE_TABLE:
  40. #ifdef tdep_put_unwind_info
  41. tdep_put_unwind_info (as, pi, arg);
  42. break;
  43. #endif
  44. /* fall through */
  45. default:
  46. break;
  47. }
  48. }