GNU Debugger



















GNU Debugger

Gdb archer fish.svg

GDB Screenshot.png
Тип
Зневаджувач
Розробник
GNU
Перший випуск
1986
Стабільний випуск
7.11 (24 лютого 2016; 1156 днів тому)
Репозиторій
sourceware.org/git/gitweb.cgi?p=binutils-gdb.git
Операційна система
Unix-подібні, Windows
Написано на
C і Scheme
Ліцензія
GNU GPL

gnu.org/software/gdb/


GNU Debugger у Вікісховищі?

GNU Debugger — переносимий зневаджувач проекту GNU, який працює на багатьох UNIX-подібних системах і вміє проводити зневадження для багатьох мов програмування, включаючи Ada, Сі, C++, Objective-C, Pascal, Фортран тощо. Працює на різних апаратних платформах (i386, amd64, ARM, PowerPC, Sparc тощо) і програмних платформах (GNU/Linux, Unix, Windows).




Зміст





  • 1 Історія


  • 2 Технічні деталі

    • 2.1 Особливості



  • 3 Приклади команд


  • 4 Приклад використання


  • 5 Посилання




Історія |


Спочатку написаний Річардом Столлменом в 1988 році. З 1990 до 1993 підтримувався Джоном Джилмором, під час його роботи в компанії Cygnus Solutions.



Технічні деталі |



Особливості |


GDB пропонує широкі засоби для спостереження і контролю за виконанням комп'ютерних програм. Користувач може змінювати внутрішні змінні програм і навіть викликати функції незалежно від звичайної поведінки програми.


Процесори підтримувані GDB (2003): Alpha, ARM, H8/300, System/370, System 390, x86 та x86-64, IA-64 (Itanium), Motorola 68000, MIPS, PA-RISC, PowerPC, SuperH, SPARC, VAX, A29K, ARC, AVR, CRIS, D10V, D30V, FR-30, FR-V, Intel i960, M32R, 68HC11, Motorola 88000, MCORE, MN10200, MN10300, NS32K, Stormy16, V850 і Z8000. (Новіші випуски не будуть, ймовірно, підтримувати деяких з них.)


Зневаджувач не містить власного графічного інтерфейсу і використовує стандартний текстовий інтерфейс консолі. Були створені декілька інтерфейсів, такі як DDD, cgdb, GDBtk / Insight і «GUD mode» в Emacs.


Деякі інші інструменти відлагодження були розроблені, щоб працювати з GDB, наприклад, датчики витоку пам'яті.



Приклади команд |













$ gdb prog.out
зневадження prog.out (з shell)

gdb> run -v
Запуск завантаженої програми з параметрами

gdb> bt
зворотне трасування (у випадку «падіння» програми)

gdb> info registers
дамп всіх регістрів

gdb> disass $pc-32 $pc+32
дизасемблювання


Приклад використання |


GNU gdb 6.5
Copyright (C) 2006 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 "i486-slackware-linux".
(gdb) run
Starting program: / home / sam / programming / crash
Reading symbols from shared object read from target memory ... done.
Loaded system supplied DSO at 0xc11000
This program will demonstrate gdb

Program received signal SIGSEGV, Segmentation fault.
0x08048428 in function_2 (x = 24) at crash.c: 22
22 return * y;
(gdb) edit
(gdb) shell gcc crash.c-o crash-gstabs +
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
warning: cannot close "shared object read from target memory": File in wrong format
'/home/sam/programming/crash' has changed; re-reading symbols.
Starting program: /home/sam/programming/crash
Reading symbols from shared object read from target memory ... done.
Loaded system supplied DSO at 0xa3e000
This program will demonstrate gdb
24
Program exited normally.
(gdb) quit

Після того, як причина помилки сегментації знайдена, програма відредагована, помилка виправлена. Виправлена програма повторно зібрана з GCC і запущена.



Посилання |


  • Домашня сторінка GDB

  • Peter Jay Salzman's GDB guide: Using GNU's GDB Debugger


  • Використання налагоджувача gdb в середовищі wxDev-C++ (укр.)





Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved