I write a simple program,its name is test.c. arm-linux-gcc -g test.c -o test
arm-linux-gcc -g -static test.c -o test-static root@fengye:~/hello# file test test-static test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped test-static: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, not stripped execution: root@fengye:/home/linux-tools/gem5-stable# arm-linux-gdb /root/hello/test problems: 1)Error while mapping shared library sections: 2)warning: Unable to find dynamic linker breakpoint function. execution:root@fengye:~/hello# arm-linux-gdb test-static It solve the second problem.But how to solve the fisrt problem ? root@fengye:/home/linux-tools/gem5-stable# arm-linux-gdb /root/hello/test GNU gdb (GDB) 7.1 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /root/hello/test...done. (gdb) set remote Z-packet on (gdb) set tdesc filename /opt/gdb-7.1/gdb/features/arm-with-neon.xml (gdb) target remote 124.16.189.179:7001 Remote debugging using 124.16.189.179:7001 Error while mapping shared library sections: �P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P: 文件名过长. Symbol file not found for �P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P5�P warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. 0xc003ac88 in ?? () (gdb) list 5for(i=0;i<n;i++) 6{ 7sum+=i; 8} 9return sum; 10} 11int main() 12{ 13int i; 14int result=0; root@fengye:~/hello# file test test-static test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped test-static: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, not stripped root@fengye:~/hello# arm-linux-gdb test-static GNU gdb (GDB) 7.1 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /root/hello/test-static...done. (gdb) set remote Z-packet on (gdb) set tdesc filename /opt/gdb-7.1/gdb/features/arm-with-neon.xml (gdb) target remote fengye:7000 Remote debugging using fengye:7000 Error while mapping shared library sections: 2P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P: 文件名过长. Error while mapping shared library sections: 2P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P: 文件名过长. Symbol file not found for 2P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P Symbol file not found for 2P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P52P 0x40012272 in ?? () (gdb) list 5 for(i=0;i<n;i++) 6 { 7 sum+=i; 8 } 9 return sum; 10 } 11 int main() 12 { 13 int i; 14 int result=0; (gdb)
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
