PythonQ 248-8XX Spécifications Page 135

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 210
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 134
`add_sect .data`\
`add_sect .sdata`\
`add_sect .bss`\
`add_sect .sbss`\
"
echo "add-symbol-file $1 $ARGS" > ~/add-symbol-file.gdb
10.4. Tips and Tricks
To prevent GDB from jumping around in the code when trying to single step, i. e. when it seems as if
the code is not executing line by line, you can recompile your code with the following additional
compiler options:
-fno-schedule-insns -fno-schedule-insns2
On some systems (like the MPC8xx or MPC8260) you can only define one hardware breakpoint.
Therefore you must delete an existing breakpoint before you can define a new one:
(gdb) d b
Delete all breakpoints? (y or n) y
(gdb) b ex_preempt.c:63
Breakpoint 2 at 0xcf030080: file ex_preempt.c, line 63.
10.5. Application Debugging
10.5.1. Local Debugging
In case there is a native GDB available for your target you can use it for application debugging as usual:
bash$ gcc -Wall -g -o hello hello.c
bash$ gdb hello
...
(gdb) l
1 #include <stdio.h>
2
3 int main(int argc, char* argv[])
4 {
5 printf ("Hello world\n");
6 return 0;
7 }
(gdb) break 5
Breakpoint 1 at 0x8048466: file hello.c, line 5.
(gdb) run
Starting program: /opt/eldk/ppc_8xx/tmp/hello
Breakpoint 1, main (argc=0x1, argv=0xbffff9f4) at hello.c:5
5 printf ("Hello world\n");
(gdb) c
Continuing.
Hello world
Program exited normally.
10.5. Application Debugging 135
Vue de la page 134
1 2 ... 130 131 132 133 134 135 136 137 138 139 140 ... 209 210

Commentaires sur ces manuels

Pas de commentaire