[OSy] Ladeni semestralky s GDB

Tomáš Martinec tomas.martinec at d3s.mff.cuni.cz
Wed Oct 24 16:28:16 CEST 2012


Hezky den,

posilam utrzek vypisu, ktery ukazuje, jak se ladi s gdb:

tomas at tomas-laptop:~/workspaceGDB/gdb-7.2/gdb$ ./gdb
GNU gdb (GDB) 7.2
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.

// zde je z polozky target videt, jestli pouzivate spravne gdb
This GDB was configured as "--host=i686-pc-linux-gnu --target=mips".

For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.

// nacteni ladicich informaci z elf binarky
(gdb) symbol-file ./../../../workspaceCDT/msim/trunk/bin/kernel/kernel.raw
Reading symbols from
/home/tomas/runtime-EclipseApplication/kalisto/kernel/kernel.raw...done.

// nastaveni spravne endianity
(gdb) set endian little
The target is assumed to be little endian

// pripojeni se k msimu
(gdb) target remote :10001
Remote debugging using :10001
0xbfc00000 in ?? ()

// nastaveni breakpointu do hlavni funkce Kalista
(gdb) break bsp_start
Breakpoint 1 at 0x80002540: file main.c, line 66.

// spusteni msimu
(gdb) continue
Continuing.
[New Thread 1]
[Switching to Thread 1]

Breakpoint 1, bsp_start () at main.c:66
66		/* Say hello :-) We write a small message after each
(gdb)

Tomas Martinec




More information about the NSWI004 mailing list