For gdb debugging, check whether the file is an executable file instead of a script.

Source: Internet
Author: User
For gdb debugging, check whether the file is an executable file, instead of the script GDB. After debugging and loading the execution program, the prompt notinexecutableformatgdbconst appears: GNUgdbRedHatLinux (5.5) Copyright2008Free... for gdb debugging, check whether the file is an executable file using file instead of the script GDB. After debugging and loading the execution program, the prompt "not in executable format" gdb const displays the following message: GNU gdb Red Hat Linux (5.5) Copyright 2008 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 "i386-redhat-linux "... const: not in executable format. solution: 1. check whether the Makefile file and CFLAGS option are added with-g # CFLAGS =-g-O2 2. file/tyoe command to view the execution file type [root @ lt-liyuncheng 2] # file const: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV ), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped # ensure that it is an executable file [root @ lt-liyuncheng 2] # type. /const. /const is. /const # ensure that the execution file path is normal. 3. if the program is being executed, run the following command during debugging: $ ps-ef | grep const $ gdb const PID.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.