色婷婷AⅤ一区二区三区|亚洲精品第一国产综合亚AV|久久精品官方网视频|日本28视频香蕉

          新聞中心

          EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 關(guān)于arm處理器 內(nèi)存編址模式 與 字節(jié)對(duì)齊方式

          關(guān)于arm處理器 內(nèi)存編址模式 與 字節(jié)對(duì)齊方式

          作者: 時(shí)間:2016-11-09 來(lái)源:網(wǎng)絡(luò) 收藏
          在x86+Linux上寫(xiě)的程序,在PC機(jī)上運(yùn)行得很好??墒鞘褂肁RM的gcc進(jìn)行交叉編譯,再送到DaVinci目標(biāo)板上運(yùn)行的時(shí)候,出現(xiàn)了Bus error。
          出現(xiàn)的位置如下(其中Debug的內(nèi)容是我在程序中添加的調(diào)試信息):
          root@211.69.193.189:~# arm_v5t_le-gcc -g shit.c
          root@211.69.193.189:~# ./a.out
          Debug: malloc space for the actual data: temp_buf = 0x13118
          Debug: in my_recvn()
          Debug: nleft = 52
          Bus error
          打開(kāi)調(diào)試器進(jìn)行調(diào)試:
          root@211.69.193.189:~# gdb a.out
          GNU gdb 6.3 (MontaVista 6.3-20.0.22.0501131 2005-07-22)
          Copyright 2004 Free Software Foundation, Inc.
          GDB is free software, covered by the GNU General Public License, and you are
          welcome to change it and/or distribute copies of it under certain conditions.
          Type "show copying" to see the conditions.
          There is absolutely no warranty for GDB. Type "show warranty" for details.
          This GDB was configured as "armv5tl-montavista-linuxeabi"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

          (gdb) run // 運(yùn)行程序
          Starting program: /home/zpf/a.out
          Debug: in get_program_info()
          Debug: in conn_server(char *err_buf_ptr)
          Debug: gonna create a socket
          Debug: gonna fill in the serv_addr structure
          Debug: gonna connect to a server
          Debug: gonna send LIN_RST
          Debug: in my_sendn()
          Debug: send 4 bytes to server: 
          Debug: gonna receive LIN_RSP
          Debug: in my_recvn()
          Debug: nleft = 3
          Debug: received first 3 bytes from server: 7
          Debug: gonna check if 3rd byte is the package type
          Debug: received package length = 55
          Debug: malloc space for the actual data: temp_buf = 0x13118
          Debug: in my_recvn()
          Debug: nleft = 52

          Program received signal SIGBUS, Bus error. // 在這里出現(xiàn)了錯(cuò)誤
          0x09624 in alloc_prog_mem (detail_buf=0x13118 "