Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

192
Visualizações
GNU gdb no depura la aplicación creada por icc (compilador Intel C) en Linux

Estoy intentando depurar la aplicación usando GNU gdb que creó icc (compilador Intel C). Pero gdb no ve ninguna línea en el archivo (pero si creo una aplicación usando gcc, todo está bien). Nunca he usado antes el compilador icc, así que tal vez haga algo mal. Por favor ayuda :)

icc - Versión 8.0

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

SO - Red Hat Enterprise Linux Server versión 6.8 (Santiago)

prueba.c:

 1 #include<stdio.h> 2 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 }

Ejecute la compilación: icc -g -inline_debug_info --gsplit-dwarf ./test.c -o test

Y cuando intenté romper la línea (línea 8, por ejemplo) en gdb, gdb muestra: No hay línea 8 en el archivo "./test.c"

Producción:

 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: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /tmp/test...done. (gdb) break 8 No line 8 in file "./test.c".
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Producción:

 080487e4 <main>: main(): /tmp/./test.c:4 ... 80487f0: 56 push %esi /tmp/./test.c:5 80487f1: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) /tmp/./test.c:6 ... 80487ff: 74 33 je 8048834 <main+0x50> /tmp/./test.c:8 ... 8048812: e8 41 fe ff ff call 8048658 <printf@plt>

Esto podría ser una confusión entre test.c y ./test.c .

¿Cambia la imagen si usa icc -g test.c -o test en su lugar?
(Usar ./test.c es bastante inusual y completamente innecesario).

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda