image.tsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import {
  2. CandidateDownloadStatus,
  3. CandidateProcessingStatus,
  4. type Image,
  5. ImageStatus,
  6. } from 'sentry/types/debugImage';
  7. export function ImageFixture(params: Partial<Image> = {}): Image {
  8. return {
  9. arch: 'x86_64',
  10. candidates: [
  11. {
  12. location: '',
  13. download: {
  14. status: CandidateDownloadStatus.NOT_FOUND,
  15. },
  16. source: 'sentry:microsoft',
  17. source_name: 'Microsoft',
  18. },
  19. {
  20. debug: {status: CandidateProcessingStatus.OK},
  21. download: {
  22. features: {
  23. has_debug_info: true,
  24. has_sources: false,
  25. has_symbols: true,
  26. has_unwind_info: false,
  27. },
  28. status: CandidateDownloadStatus.OK,
  29. },
  30. location: 'sentry://project_debug_file/17',
  31. source: 'sentry:project',
  32. source_name: 'Sentry',
  33. },
  34. {
  35. download: {
  36. status: CandidateDownloadStatus.MALFORMED,
  37. },
  38. location: 'burgenland',
  39. source_name: 'Austria',
  40. source: 'sentry://project_debug_file/18',
  41. },
  42. {
  43. download: {
  44. status: CandidateDownloadStatus.MALFORMED,
  45. },
  46. location: 'brussels',
  47. source: 'sentry://project_debug_file/19',
  48. source_name: 'Belgium',
  49. },
  50. {
  51. download: {
  52. status: CandidateDownloadStatus.MALFORMED,
  53. },
  54. location: 'arizona',
  55. source: 'sentry://project_debug_file/20',
  56. source_name: 'America',
  57. },
  58. ],
  59. code_file: '/Users/foo/Coding/sentry-native/build/./sentry_example',
  60. code_id: '43fd26cc39043633a546f1b003ea17a4',
  61. debug_file: 'sentry_example',
  62. debug_id: '43fd26cc-3904-3633-a546-f1b003ea17a4',
  63. debug_status: ImageStatus.FOUND,
  64. features: {
  65. has_debug_info: true,
  66. has_sources: false,
  67. has_symbols: true,
  68. has_unwind_info: false,
  69. },
  70. image_addr: '0x10753f000',
  71. image_size: 16384,
  72. type: 'macho',
  73. unwind_status: ImageStatus.UNUSED,
  74. ...params,
  75. };
  76. }