gpt4 book ai didi

objective-c - EXC_BAD_ACCESS 指向我一行代码

转载 作者:行者123 更新时间:2023-11-30 15:58:14 26 4
gpt4 key购买 nike

我试图知道我做错了什么,因为控制台给了我一个 EXC_BAD_ACCESS,就在我指向下面的 ARM 线上。任何指向解决方案的内容都可能有所帮助,因为我不明白为什么会出现此错误。

谢谢。

 /*
* Copyright (c) 1999-2007 Apple Inc. All rights reserved.
*/

#ifndef _OS_OSBYTEORDERARM_H
#define _OS_OSBYTEORDERARM_H

#include <stdint.h>
#include <arm/arch.h> /* for _ARM_ARCH_6 */

#if !defined(OS_INLINE)
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# define OS_INLINE static inline
# else
# define OS_INLINE static __inline__
# endif
#endif

* Generic byte swapping functions. */

OS_INLINE
uint16_t
_OSSwapInt16(
uint16_t data
)
{
#if defined(__llvm__)
data = (data << 8 | data >> 8);
#elif defined(_ARM_ARCH_6)
__asm__ ("rev16 %0, %1\n" : "=l" (data) : "l" (data)); <- This is the line pointed by the compiler

最佳答案

你写道:

<- This is the line pointed by the compiler

您说编译期间发生了 EXC_BAD_ACCESS 。如果编译器在工作期间抛出这样的异常,它会将其转储并为我提供更好的异常。

关于objective-c - EXC_BAD_ACCESS 指向我一行代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9908286/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com