• Uncategorized

About linux : GNU-gdb-do-not-debug-application-built-by-icc-Intel-C-compiler-on-Linux

Question Detail

I’m trying debug application using GNU gdb that built by icc (Intel C compiler). But gdb not see any line in file (but if I build app using gcc everything fine).
I have never used before icc compiler so maybe I do something wrong. Please help 🙂

icc – Version 8.0

gdb – GNU gdb (GDB) Red Hat Enterprise Linux (7.2-90.el6)

OS – Red Hat Enterprise Linux Server release 6.8 (Santiago)


1  #include<stdio.h>
3  int main(int argc, char **argv)
4  {
5          int count = 0;
6          while(1)
7          {
8                  printf("Work In %d \n",count);
9                  count++;
10                  sleep(2);
11          }
12  }

Run build: icc -g -inline_debug_info –gsplit-dwarf ./test.c -o test

And when I tryied to break line (8 line for example) in gdb, gdb shows: No line 8 in file “./test.c”


GNU gdb (GDB) Red Hat Enterprise Linux (7.2-90.el6)
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 "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /tmp/test...done.

(gdb) break 8

No line 8 in file "./test.c".

Question Answer

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.