Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/documentation/content/ru/books/developers-handbook/kerneldebug/_index.po
18099 views
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR The FreeBSD Project
# This file is distributed under the same license as the FreeBSD Documentation package.
# Vladlen Popolitov <[email protected]>, 2025, 2026.
msgid ""
msgstr ""
"Project-Id-Version: FreeBSD Documentation VERSION\n"
"POT-Creation-Date: 2026-05-09 23:29+0100\n"
"PO-Revision-Date: 2026-05-11 04:45+0000\n"
"Last-Translator: Vladlen Popolitov <[email protected]>\n"
"Language-Team: Russian <https://translate-dev.freebsd.org/projects/"
"documentation/booksdevelopers-handbookkerneldebug_index/ru/>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 4.17\n"

#. type: YAML Front Matter: description
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:1
#, no-wrap
msgid "FreeBSD Kernel Debugging"
msgstr "Отладка ядра FreeBSD"

#. type: YAML Front Matter: title
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:1
#, no-wrap
msgid "Chapter 10. Kernel Debugging"
msgstr "Глава 10. Отладка ядра"

#. type: Title =
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:18
#, no-wrap
msgid "Kernel Debugging"
msgstr "Отладка ядра"

#. type: Title ==
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:56
#, no-wrap
msgid "Obtaining a Kernel Crash Dump"
msgstr "Получение аварийного дампа ядра"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:61
msgid ""
"When running a development kernel (e.g., FreeBSD-CURRENT), such as a kernel "
"under extreme conditions (e.g., very high load averages, tens of thousands "
"of connections, exceedingly high number of concurrent users, hundreds of man:"
"jail[8]s, etc.), or using a new feature or device driver on FreeBSD-STABLE "
"(e.g., PAE), sometimes a kernel will panic.  In the event that it does, this "
"chapter will demonstrate how to extract useful information out of a crash."
msgstr ""
"При работе с разрабатываемым ядром (например, FreeBSD-CURRENT), особенно в "
"экстремальных условиях (например, при очень высокой загрузке, десятках тысяч "
"соединений, чрезвычайно большом количестве одновременных пользователей, "
"сотнях man:jail[8] и т.д.), или при использовании новой функции или драйвера "
"устройства в FreeBSD-STABLE (например, PAE), иногда может возникнуть паника "
"ядра. В случае, если это произойдет, данная глава покажет, как извлечь "
"полезную информацию из аварийного дампа."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:66
msgid ""
"A system reboot is inevitable once a kernel panics.  Once a system is "
"rebooted, the contents of a system's physical memory (RAM) is lost, as well "
"as any bits that are on the swap device before the panic.  To preserve the "
"bits in physical memory, the kernel makes use of the swap device as a "
"temporary place to store the bits that are in RAM across a reboot after a "
"crash.  In doing this, when FreeBSD boots after a crash, a kernel image can "
"now be extracted and debugging can take place."
msgstr ""
"Перезагрузка системы неизбежна после паники ядра. После перезагрузки системы "
"содержимое физической памяти (RAM) теряется, как и любые данные на "
"устройстве подкачки перед паникой. Чтобы сохранить данные в физической "
"памяти, ядро использует устройство подкачки как временное хранилище для "
"данных из RAM после сбоя и перезагрузки. Благодаря этому, когда FreeBSD "
"загружается после сбоя, образ ядра может быть извлечен и проведена отладка."

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:72
msgid ""
"A swap device that has been configured as a dump device still acts as a swap "
"device.  Dumps to non-swap devices (such as tapes or CDRWs, for example) are "
"not supported at this time.  A \"swap device\" is synonymous with a \"swap "
"partition.\""
msgstr ""
"Устройство подкачки, настроенное как устройство для дампа, продолжает "
"функционировать как устройство подкачки. В настоящее время дампы на "
"устройства, не являющиеся устройствами подкачки (например, на ленты или "
"CDRW), не поддерживаются. Термин \"устройство подкачки\" является синонимом "
"термина \"раздел подкачки\"."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:75
msgid "Several types of kernel crash dumps are available:"
msgstr "Есть несколько типов аварийных дампов ядра:"

#. type: Labeled list
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:76
#, no-wrap
msgid "Full memory dumps"
msgstr "Полные дампы памяти"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:78
msgid "Hold the complete contents of physical memory."
msgstr "Содержат полное содержимое физической памяти."

#. type: Labeled list
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:79
#, no-wrap
msgid "Minidumps"
msgstr "Минидампы"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:81
msgid "Hold only memory pages in use by the kernel."
msgstr "Содержат только страницы памяти, используемые ядром."

#. type: Labeled list
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:82
#, no-wrap
msgid "Textdumps"
msgstr "Текстовые дампы"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:84
msgid "Hold captured, scripted, or interactive debugger output."
msgstr ""
"Содержать захваченные, записанные или интерактивные выходные данные "
"отладчика."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:86
msgid ""
"Minidumps are the default dump type, and in most cases will capture all "
"necessary information present in a full memory dump, as most problems can be "
"isolated only using kernel state."
msgstr ""
"Минидампы являются типом дампа по умолчанию и в большинстве случаев они "
"сохраняют всю необходимую информацию, присутствующую в полном дампе памяти, "
"так как большинство проблем можно изолировать, используя только состояние "
"ядра."

#. type: Title ===
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:88
#, no-wrap
msgid "Configuring the Dump Device"
msgstr "Настройка устройства дампа"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:96
msgid ""
"Before the kernel will dump the contents of its physical memory to a dump "
"device, a dump device must be configured.  A dump device is specified by "
"using the man:dumpon[8] command to tell the kernel where to save kernel "
"crash dumps.  The man:dumpon[8] program must be called after the swap "
"partition has been configured with man:swapon[8].  This is normally handled "
"by setting the `dumpdev` variable in man:rc.conf[5] to the path of the swap "
"device (the recommended way to extract a kernel dump) or `AUTO` to use the "
"first configured swap device.  The default for `dumpdev` is `AUTO` in HEAD, "
"and changed to `NO` on RELENG_* branches (except for RELENG_7, which was "
"left set to `AUTO`).  On FreeBSD 9.0-RELEASE and later versions, bsdinstall "
"will ask whether crash dumps should be enabled on the target system during "
"the install process."
msgstr ""
"Прежде чем ядро запишет содержимое своей физической памяти на устройство "
"дампа, необходимо настроить это устройство. Устройство дампа указывается с "
"помощью команды man:dumpon[8], чтобы сообщить ядру, куда сохранять аварийные "
"дампы. Программа man:dumpon[8] должна быть вызвана после настройки раздела "
"подкачки с помощью man:swapon[8]. Обычно это обрабатывается установкой "
"переменной `dumpdev` в man:rc.conf[5] в путь к устройству подкачки "
"(рекомендуемый способ извлечения дампа ядра) или в значение `AUTO` для "
"использования первого настроенного устройства подкачки. По умолчанию "
"`dumpdev` имеет значение `AUTO` в HEAD и изменено на `NO` в ветках RELENG_* "
"(за исключением RELENG_7, где оставлено значение `AUTO`). Начиная с FreeBSD "
"9.0-RELEASE и более поздних версий, bsdinstall будет спрашивать, следует ли "
"включить аварийные дампы на целевой системе во время процесса установки."

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:100
msgid ""
"Check [.filename]#/etc/fstab# or man:swapinfo[8] for a list of swap devices."
msgstr ""
"Проверьте [.filename]#/etc/fstab# или man:swapinfo[8] для получения списка "
"устройств подкачки."

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:105
msgid ""
"Make sure the `dumpdir` specified in man:rc.conf[5] exists before a kernel "
"crash!"
msgstr ""
"Убедитесь, что каталог `dumpdir`, указанный в man:rc.conf[5], существует "
"перед аварией ядра!"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:110
#, no-wrap
msgid ""
"# mkdir /var/crash\n"
"# chmod 700 /var/crash\n"
msgstr ""
"# mkdir /var/crash\n"
"# chmod 700 /var/crash\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:113
msgid ""
"Also, remember that the contents of [.filename]#/var/crash# is sensitive and "
"very likely contains confidential information such as passwords."
msgstr ""
"Также помните, что содержимое [.filename]#/var/crash# является "
"конфиденциальным и, скорее всего, содержит секретную информацию, такую как "
"пароли."

#. type: Title ===
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:116
#, no-wrap
msgid "Extracting a Kernel Dump"
msgstr "Извлечение дампа ядра"

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:122
msgid ""
"Once a dump has been written to a dump device, the dump must be extracted "
"before the swap device is mounted.  To extract a dump from a dump device, "
"use the man:savecore[8] program.  If `dumpdev` has been set in man:rc."
"conf[5], man:savecore[8] will be called automatically on the first multi-"
"user boot after the crash and before the swap device is mounted.  The "
"location of the extracted core is placed in the man:rc.conf[5] value "
"`dumpdir`, by default [.filename]#/var/crash# and will be named [."
"filename]#vmcore.0#."
msgstr ""
"После записи дампа на устройство дампа, дамп должен быть извлечен до "
"монтирования устройства подкачки. Для извлечения дампа с устройства дампа "
"используйте программу man:savecore[8]. Если в man:rc.conf[5] установлен "
"параметр `dumpdev`, man:savecore[8] будет автоматически вызван при первой "
"загрузке в многопользовательском режиме после сбоя и до монтирования "
"устройства подкачки. Расположение извлеченного ядра указывается в параметре "
"`dumpdir` файла man:rc.conf[5], по умолчанию это [.filename]#/var/crash#, а "
"имя файла будет [.filename]#vmcore.0#."

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:126
msgid ""
"In the event that there is already a file called [.filename]#vmcore.0# in [."
"filename]#/var/crash# (or whatever `dumpdir` is set to), the kernel will "
"increment the trailing number for every crash to avoid overwriting an "
"existing [.filename]#vmcore# (e.g., [.filename]#vmcore.1#).  man:savecore[8] "
"will always create a symbolic link to named [.filename]#vmcore.last# in [."
"filename]#/var/crash# after a dump is saved.  This symbolic link can be used "
"to locate the name of the most recent dump."
msgstr ""
"В случае, если файл с именем [.filename]#vmcore.0# уже существует в [."
"filename]#/var/crash# (или в каталоге, указанном в параметре `dumpdir`), "
"ядро будет увеличивать завершающее число при каждом сбое, чтобы избежать "
"перезаписи существующего файла [.filename]#vmcore# (например, [."
"filename]#vmcore.1#).  man:savecore[8] всегда создаёт символическую ссылку с "
"именем [.filename]#vmcore.last# в [.filename]#/var/crash# после сохранения "
"дампа. Эта символическая ссылка может быть использована для определения "
"имени последнего дампа."

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:130
msgid ""
"The man:crashinfo[8] utility generates a text file containing a summary of "
"information from a full memory dump or minidump.  If `dumpdev` has been set "
"in man:rc.conf[5], man:crashinfo[8] will be invoked automatically after man:"
"savecore[8].  The output is saved to a file in `dumpdir` named [."
"filename]#core.txt.N#."
msgstr ""
"Утилита man:crashinfo[8] создаёт текстовый файл, содержащий сводную "
"информацию из полного дампа памяти или минидампа. Если параметр `dumpdev` "
"установлен в man:rc.conf[5], man:crashinfo[8] будет автоматически вызван "
"после man:savecore[8]. Результат сохраняется в файл с именем [."
"filename]#core.txt.N# в каталоге `dumpdir`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:135
msgid ""
"If you are testing a new kernel but need to boot a different one in order to "
"get your system up and running again, boot it only into single user mode "
"using the `-s` flag at the boot prompt, and then perform the following steps:"
msgstr ""
"Если вы тестируете новое ядро, но вам нужно загрузить другое, чтобы снова "
"запустить систему, загрузите его только в однопользовательском режиме, "
"используя флаг `-s` при загрузке, а затем выполните следующие шаги:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:142
#, no-wrap
msgid ""
"# fsck -p\n"
"# mount -a -t ufs       # make sure /var/crash is writable\n"
"# savecore /var/crash /dev/ad0s1b\n"
"# exit                  # exit to multi-user\n"
msgstr ""
"# fsck -p\n"
"# mount -a -t ufs       # make sure /var/crash is writable\n"
"# savecore /var/crash /dev/ad0s1b\n"
"# exit                  # exit to multi-user\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:147
msgid ""
"This instructs man:savecore[8] to extract a kernel dump from [.filename]#/"
"dev/ad0s1b# and place the contents in [.filename]#/var/crash#.  Do not "
"forget to make sure the destination directory [.filename]#/var/crash# has "
"enough space for the dump.  Also, do not forget to specify the correct path "
"to your swap device as it is likely different than [.filename]#/dev/ad0s1b#!"
msgstr ""
"Это указывает man:savecore[8] извлечь дамп ядра из [.filename]#/dev/ad0s1b# "
"и поместить содержимое в [.filename]#/var/crash#. Не забудьте убедиться, что "
"целевой каталог [.filename]#/var/crash# имеет достаточно места для дампа. "
"Также не забудьте указать правильный путь к вашему swap-устройству, так как "
"он, скорее всего, отличается от [.filename]#/dev/ad0s1b#!"

#. type: Title ===
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:149
#, no-wrap
msgid "Testing Kernel Dump Configuration"
msgstr "Тестирование конфигурации дампа ядра"

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:154
msgid ""
"The kernel includes a man:sysctl[8] node that requests a kernel panic.  This "
"can be used to verify that your system is properly configured to save kernel "
"crash dumps.  You may wish to remount existing file systems as read-only in "
"single user mode before triggering the crash to avoid data loss."
msgstr ""
"Ядро включает узел man:sysctl[8], который вызывает панику ядра. Это можно "
"использовать для проверки того, что ваша система правильно настроена для "
"сохранения дампов аварийного завершения работы ядра. Возможно, вы захотите "
"перемонтировать существующие файловые системы в режиме только для чтения в "
"однопользовательском режиме перед тем, как вызвать панику, чтобы избежать "
"потери данных."

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:164
#, no-wrap
msgid ""
"# shutdown now\n"
"...\n"
"Enter full pathname of shell or RETURN for /bin/sh:\n"
"# mount -a -u -r\n"
"# sysctl debug.kdb.panic=1\n"
"debug.kdb.panic:panic: kdb_sysctl_panic\n"
"...\n"
msgstr ""
"# shutdown now\n"
"...\n"
"Enter full pathname of shell or RETURN for /bin/sh:\n"
"# mount -a -u -r\n"
"# sysctl debug.kdb.panic=1\n"
"debug.kdb.panic:panic: kdb_sysctl_panic\n"
"...\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:167
msgid ""
"After rebooting, your system should save a dump in [.filename]#/var/crash# "
"along with a matching summary from man:crashinfo[8]."
msgstr ""
"После перезагрузки система должна сохранить дамп в [.filename]#/var/crash# "
"вместе с соответствующим отчётом из man:crashinfo[8]."

#. type: Title ==
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:169
#, no-wrap
msgid "Debugging a Kernel Crash Dump with `kgdb`"
msgstr "Отладка аварийного дампа ядра с помощью `kgdb`"

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:175
msgid ""
"This section covers man:kgdb[1].  The latest version is included in the "
"package:devel/gdb[]."
msgstr ""
"Этот раздел посвящен man:kgdb[1]. Последняя версия включена в пакет package:"
"devel/gdb[]."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:178
msgid ""
"To enter into the debugger and begin getting information from the dump, "
"start kgdb:"
msgstr ""
"Чтобы войти в отладчик и начать получение информации из дампа, запустите "
"kgdb:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:182
#, no-wrap
msgid "# kgdb -n N\n"
msgstr "# kgdb -n N\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:186
msgid ""
"Where _N_ is the suffix of the [.filename]#vmcore.N# to examine.  To open "
"the most recent dump use:"
msgstr ""
"Где _N_ — это суффикс файла [.filename]#vmcore.N#, который нужно изучить. "
"Чтобы открыть последний дамп, используйте:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:190
#, no-wrap
msgid "# kgdb -n last\n"
msgstr "# kgdb -n last\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:194
msgid ""
"Normally, man:kgdb[1] should be able to locate the kernel running at the "
"time the dump was generated.  If it is not able to locate the correct "
"kernel, pass the pathname of the kernel and dump as two arguments to kgdb:"
msgstr ""
"Обычно man:kgdb[1] должен быть способен найти ядро, работавшее в момент "
"создания дампа. Если он не может найти нужное ядро, передайте путь к ядру и "
"дампу в качестве двух аргументов для kgdb:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:198
#, no-wrap
msgid "# kgdb /boot/kernel/kernel /var/crash/vmcore.0\n"
msgstr "# kgdb /boot/kernel/kernel /var/crash/vmcore.0\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:201
msgid ""
"You can debug the crash dump using the kernel sources just like you can for "
"any other program."
msgstr ""
"Вы можете отлаживать дамп аварийного завершения, используя исходные коды "
"ядра, так же, как и для любой другой программы."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:208
msgid ""
"This dump is from a 5.2-BETA kernel and the crash comes from deep within the "
"kernel.  The output below has been modified to include line numbers on the "
"left.  This first trace inspects the instruction pointer and obtains a back "
"trace.  The address that is used on line 41 for the `list` command is the "
"instruction pointer and can be found on line 17.  Most developers will "
"request having at least this information sent to them if you are unable to "
"debug the problem yourself.  If, however, you do solve the problem, make "
"sure that your patch winds its way into the source tree via a problem "
"report, mailing lists, or by being able to commit it!"
msgstr ""
"Этот дамп получен из ядра версии 5.2-BETA, а крах произошел глубоко внутри "
"ядра. Приведенный ниже вывод был изменён для добавления номеров строк слева. "
"Первый трассировочный вывод проверяет указатель инструкции и получает "
"обратную трассировку. Адрес, используемый в строке 41 для команды `list`, "
"является указателем инструкции и может быть найден в строке 17. Большинство "
"разработчиков запросят как минимум эту информацию, если вы не сможете "
"отладить проблему самостоятельно. Однако, если вы решите проблему, "
"убедитесь, что ваш патч попадет в дерево исходников через отчёт о проблеме, "
"списки рассылки, или, может быть, у вас есть возможность его закоммитить!"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:301
#, no-wrap
msgid ""
" 1:# cd /usr/obj/usr/src/sys/KERNCONF\n"
" 2:# kgdb kernel.debug /var/crash/vmcore.0\n"
" 3:GNU gdb 5.2.1 (FreeBSD)\n"
" 4:Copyright 2002 Free Software Foundation, Inc.\n"
" 5:GDB is free software, covered by the GNU General Public License, and you are\n"
" 6:welcome to change it and/or distribute copies of it under certain conditions.\n"
" 7:Type \"show copying\" to see the conditions.\n"
" 8:There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
" 9:This GDB was configured as \"i386-undermydesk-freebsd\"...\n"
"10:panic: page fault\n"
"11:panic messages:\n"
"12:---\n"
"13:Fatal trap 12: page fault while in kernel mode\n"
"14:cpuid = 0; apic id = 00\n"
"15:fault virtual address   = 0x300\n"
"16:fault code:             = supervisor read, page not present\n"
"17:instruction pointer     = 0x8:0xc0713860\n"
"18:stack pointer           = 0x10:0xdc1d0b70\n"
"19:frame pointer           = 0x10:0xdc1d0b7c\n"
"20:code segment            = base 0x0, limit 0xfffff, type 0x1b\n"
"21:                        = DPL 0, pres 1, def32 1, gran 1\n"
"22:processor eflags        = resume, IOPL = 0\n"
"23:current process         = 14394 (uname)\n"
"24:trap number             = 12\n"
"25:panic: page fault\n"
"26      cpuid = 0;\n"
"27:Stack backtrace:\n"
"28\n"
"29:syncing disks, buffers remaining... 2199 2199 panic: mi_switch: switch in a critical section\n"
"30:cpuid = 0;\n"
"31:Uptime: 2h43m19s\n"
"32:Dumping 255 MB\n"
"33: 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240\n"
"34:---\n"
"35:Reading symbols from /boot/kernel/snd_maestro3.ko...done.\n"
"36:Loaded symbols for /boot/kernel/snd_maestro3.ko\n"
"37:Reading symbols from /boot/kernel/snd_pcm.ko...done.\n"
"38:Loaded symbols for /boot/kernel/snd_pcm.ko\n"
"39:#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240\n"
"40:240             dumping++;\n"
"41:(kgdb) list *0xc0713860\n"
"42:0xc0713860 is in lapic_ipi_wait (/usr/src/sys/i386/i386/local_apic.c:663).\n"
"43:658                     incr = 0;\n"
"44:659                     delay = 1;\n"
"45:660             } else\n"
"46:661                     incr = 1;\n"
"47:662             for (x = 0; x < delay; x += incr) {\n"
"48:663                     if ((lapic->icr_lo & APIC_DELSTAT_MASK) == APIC_DELSTAT_IDLE)\n"
"49:664                             return (1);\n"
"50:665                     ia32_pause();\n"
"51:666             }\n"
"52:667             return (0);\n"
"53:(kgdb) backtrace\n"
"54:#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240\n"
"55:#1  0xc055fd9b in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:372\n"
"56:#2  0xc056019d in panic () at /usr/src/sys/kern/kern_shutdown.c:550\n"
"57:#3  0xc0567ef5 in mi_switch () at /usr/src/sys/kern/kern_synch.c:470\n"
"58:#4  0xc055fa87 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:312\n"
"59:#5  0xc056019d in panic () at /usr/src/sys/kern/kern_shutdown.c:550\n"
"60:#6  0xc0720c66 in trap_fatal (frame=0xdc1d0b30, eva=0)\n"
"61:    at /usr/src/sys/i386/i386/trap.c:821\n"
"62:#7  0xc07202b3 in trap (frame=\n"
"63:      {tf_fs = -1065484264, tf_es = -1065484272, tf_ds = -1065484272, tf_edi = 1, tf_esi = 0, tf_ebp = -602076292, tf_isp = -602076324, tf_ebx = 0, tf_edx = 0, tf_ecx = 1000000, tf_eax = 243, tf_trapno = 12, tf_err = 0, tf_eip = -1066321824, tf_cs = 8, tf_eflags = 65671, tf_esp = 243, tf_ss = 0})\n"
"64:    at /usr/src/sys/i386/i386/trap.c:250\n"
"65:#8  0xc070c9f8 in calltrap () at {standard input}:94\n"
"66:#9  0xc07139f3 in lapic_ipi_vectored (vector=0, dest=0)\n"
"67:    at /usr/src/sys/i386/i386/local_apic.c:733\n"
"68:#10 0xc0718b23 in ipi_selected (cpus=1, ipi=1)\n"
"69:    at /usr/src/sys/i386/i386/mp_machdep.c:1115\n"
"70:#11 0xc057473e in kseq_notify (ke=0xcc05e360, cpu=0)\n"
"71:    at /usr/src/sys/kern/sched_ule.c:520\n"
"72:#12 0xc0575cad in sched_add (td=0xcbcf5c80)\n"
"73:    at /usr/src/sys/kern/sched_ule.c:1366\n"
"74:#13 0xc05666c6 in setrunqueue (td=0xcc05e360)\n"
"75:    at /usr/src/sys/kern/kern_switch.c:422\n"
"76:#14 0xc05752f4 in sched_wakeup (td=0xcbcf5c80)\n"
"77:    at /usr/src/sys/kern/sched_ule.c:999\n"
"78:#15 0xc056816c in setrunnable (td=0xcbcf5c80)\n"
"79:    at /usr/src/sys/kern/kern_synch.c:570\n"
"80:#16 0xc0567d53 in wakeup (ident=0xcbcf5c80)\n"
"81:    at /usr/src/sys/kern/kern_synch.c:411\n"
"82:#17 0xc05490a8 in exit1 (td=0xcbcf5b40, rv=0)\n"
"83:    at /usr/src/sys/kern/kern_exit.c:509\n"
"84:#18 0xc0548011 in sys_exit () at /usr/src/sys/kern/kern_exit.c:102\n"
"85:#19 0xc0720fd0 in syscall (frame=\n"
"86:      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 0, tf_esi = -1, tf_ebp = -1077940712, tf_isp = -602075788, tf_ebx = 672411944, tf_edx = 10, tf_ecx = 672411600, tf_eax = 1, tf_trapno = 12, tf_err = 2, tf_eip = 671899563, tf_cs = 31, tf_eflags = 642, tf_esp = -1077940740, tf_ss = 47})\n"
"87:    at /usr/src/sys/i386/i386/trap.c:1010\n"
"88:#20 0xc070ca4d in Xint0x80_syscall () at {standard input}:136\n"
"89:---Can't read userspace from dump, or kernel process---\n"
"90:(kgdb) quit\n"
msgstr ""
" 1:# cd /usr/obj/usr/src/sys/KERNCONF\n"
" 2:# kgdb kernel.debug /var/crash/vmcore.0\n"
" 3:GNU gdb 5.2.1 (FreeBSD)\n"
" 4:Copyright 2002 Free Software Foundation, Inc.\n"
" 5:GDB is free software, covered by the GNU General Public License, and you are\n"
" 6:welcome to change it and/or distribute copies of it under certain conditions.\n"
" 7:Type \"show copying\" to see the conditions.\n"
" 8:There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
" 9:This GDB was configured as \"i386-undermydesk-freebsd\"...\n"
"10:panic: page fault\n"
"11:panic messages:\n"
"12:---\n"
"13:Fatal trap 12: page fault while in kernel mode\n"
"14:cpuid = 0; apic id = 00\n"
"15:fault virtual address   = 0x300\n"
"16:fault code:             = supervisor read, page not present\n"
"17:instruction pointer     = 0x8:0xc0713860\n"
"18:stack pointer           = 0x10:0xdc1d0b70\n"
"19:frame pointer           = 0x10:0xdc1d0b7c\n"
"20:code segment            = base 0x0, limit 0xfffff, type 0x1b\n"
"21:                        = DPL 0, pres 1, def32 1, gran 1\n"
"22:processor eflags        = resume, IOPL = 0\n"
"23:current process         = 14394 (uname)\n"
"24:trap number             = 12\n"
"25:panic: page fault\n"
"26      cpuid = 0;\n"
"27:Stack backtrace:\n"
"28\n"
"29:syncing disks, buffers remaining... 2199 2199 panic: mi_switch: switch in a critical section\n"
"30:cpuid = 0;\n"
"31:Uptime: 2h43m19s\n"
"32:Dumping 255 MB\n"
"33: 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240\n"
"34:---\n"
"35:Reading symbols from /boot/kernel/snd_maestro3.ko...done.\n"
"36:Loaded symbols for /boot/kernel/snd_maestro3.ko\n"
"37:Reading symbols from /boot/kernel/snd_pcm.ko...done.\n"
"38:Loaded symbols for /boot/kernel/snd_pcm.ko\n"
"39:#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240\n"
"40:240             dumping++;\n"
"41:(kgdb) list *0xc0713860\n"
"42:0xc0713860 is in lapic_ipi_wait (/usr/src/sys/i386/i386/local_apic.c:663).\n"
"43:658                     incr = 0;\n"
"44:659                     delay = 1;\n"
"45:660             } else\n"
"46:661                     incr = 1;\n"
"47:662             for (x = 0; x < delay; x += incr) {\n"
"48:663                     if ((lapic->icr_lo & APIC_DELSTAT_MASK) == APIC_DELSTAT_IDLE)\n"
"49:664                             return (1);\n"
"50:665                     ia32_pause();\n"
"51:666             }\n"
"52:667             return (0);\n"
"53:(kgdb) backtrace\n"
"54:#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240\n"
"55:#1  0xc055fd9b in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:372\n"
"56:#2  0xc056019d in panic () at /usr/src/sys/kern/kern_shutdown.c:550\n"
"57:#3  0xc0567ef5 in mi_switch () at /usr/src/sys/kern/kern_synch.c:470\n"
"58:#4  0xc055fa87 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:312\n"
"59:#5  0xc056019d in panic () at /usr/src/sys/kern/kern_shutdown.c:550\n"
"60:#6  0xc0720c66 in trap_fatal (frame=0xdc1d0b30, eva=0)\n"
"61:    at /usr/src/sys/i386/i386/trap.c:821\n"
"62:#7  0xc07202b3 in trap (frame=\n"
"63:      {tf_fs = -1065484264, tf_es = -1065484272, tf_ds = -1065484272, tf_edi = 1, tf_esi = 0, tf_ebp = -602076292, tf_isp = -602076324, tf_ebx = 0, tf_edx = 0, tf_ecx = 1000000, tf_eax = 243, tf_trapno = 12, tf_err = 0, tf_eip = -1066321824, tf_cs = 8, tf_eflags = 65671, tf_esp = 243, tf_ss = 0})\n"
"64:    at /usr/src/sys/i386/i386/trap.c:250\n"
"65:#8  0xc070c9f8 in calltrap () at {standard input}:94\n"
"66:#9  0xc07139f3 in lapic_ipi_vectored (vector=0, dest=0)\n"
"67:    at /usr/src/sys/i386/i386/local_apic.c:733\n"
"68:#10 0xc0718b23 in ipi_selected (cpus=1, ipi=1)\n"
"69:    at /usr/src/sys/i386/i386/mp_machdep.c:1115\n"
"70:#11 0xc057473e in kseq_notify (ke=0xcc05e360, cpu=0)\n"
"71:    at /usr/src/sys/kern/sched_ule.c:520\n"
"72:#12 0xc0575cad in sched_add (td=0xcbcf5c80)\n"
"73:    at /usr/src/sys/kern/sched_ule.c:1366\n"
"74:#13 0xc05666c6 in setrunqueue (td=0xcc05e360)\n"
"75:    at /usr/src/sys/kern/kern_switch.c:422\n"
"76:#14 0xc05752f4 in sched_wakeup (td=0xcbcf5c80)\n"
"77:    at /usr/src/sys/kern/sched_ule.c:999\n"
"78:#15 0xc056816c in setrunnable (td=0xcbcf5c80)\n"
"79:    at /usr/src/sys/kern/kern_synch.c:570\n"
"80:#16 0xc0567d53 in wakeup (ident=0xcbcf5c80)\n"
"81:    at /usr/src/sys/kern/kern_synch.c:411\n"
"82:#17 0xc05490a8 in exit1 (td=0xcbcf5b40, rv=0)\n"
"83:    at /usr/src/sys/kern/kern_exit.c:509\n"
"84:#18 0xc0548011 in sys_exit () at /usr/src/sys/kern/kern_exit.c:102\n"
"85:#19 0xc0720fd0 in syscall (frame=\n"
"86:      {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 0, tf_esi = -1, tf_ebp = -1077940712, tf_isp = -602075788, tf_ebx = 672411944, tf_edx = 10, tf_ecx = 672411600, tf_eax = 1, tf_trapno = 12, tf_err = 2, tf_eip = 671899563, tf_cs = 31, tf_eflags = 642, tf_esp = -1077940740, tf_ss = 47})\n"
"87:    at /usr/src/sys/i386/i386/trap.c:1010\n"
"88:#20 0xc070ca4d in Xint0x80_syscall () at {standard input}:136\n"
"89:---Can't read userspace from dump, or kernel process---\n"
"90:(kgdb) quit\n"

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:307
msgid ""
"If your system is crashing regularly and you are running out of disk space, "
"deleting old [.filename]#vmcore# files in [.filename]#/var/crash# could save "
"a considerable amount of disk space!"
msgstr ""
"Если ваша система регулярно завершается аварийно и у вас заканчивается место "
"на диске, удаление старых файлов [.filename]#vmcore# в [.filename]#/var/"
"crash# может освободить значительное количество дискового пространства!"

#. type: Title ==
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:310
#, no-wrap
msgid "On-Line Kernel Debugging Using DDB"
msgstr "Онлайн-отладка ядра с использованием DDB"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:314
msgid ""
"While `kgdb` as an off-line debugger provides a very high level of user "
"interface, there are some things it cannot do.  The most important ones "
"being breakpointing and single-stepping kernel code."
msgstr ""
"В то время как `kgdb` как автономный отладчик предоставляет очень высокий "
"уровень пользовательского интерфейса, есть некоторые вещи, которые он не "
"может выполнить. Наиболее важные из них — установка точек останова и "
"пошаговое выполнение кода ядра."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:318
msgid ""
"If you need to do low-level debugging on your kernel, there is an on-line "
"debugger available called DDB.  It allows setting of breakpoints, single-"
"stepping kernel functions, examining and changing kernel variables, etc.  "
"However, it cannot access kernel source files, and only has access to the "
"global and static symbols, not to the full debug information like `kgdb` "
"does."
msgstr ""
"Если вам требуется выполнить низкоуровневую отладку ядра, доступен отладчик "
"DDB, работающий в режиме реального времени. Он позволяет устанавливать точки "
"останова, выполнять пошаговое выполнение функций ядра, проверять и изменять "
"переменные ядра и т.д. Однако он не имеет доступа к исходным файлам ядра и "
"работает только с глобальными и статическими символами, без доступа к полной "
"отладочной информации, как это делает `kgdb`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:320
msgid "To configure your kernel to include DDB, add the options"
msgstr "Для настройки ядра с включенной поддержкой DDB добавьте параметры"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:323
#, no-wrap
msgid "options KDB\n"
msgstr "options KDB\n"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:328
#, no-wrap
msgid "options DDB\n"
msgstr "options DDB\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:332
msgid ""
"to your config file, and rebuild.  (See extref:{handbook}[The FreeBSD "
"Handbook] for details on configuring the FreeBSD kernel)."
msgstr ""
"в ваш конфигурационный файл, и пересоберите. (Подробности о настройке ядра "
"FreeBSD см. в extref:{handbook}[Руководстве FreeBSD])."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:338
msgid ""
"Once your DDB kernel is running, there are several ways to enter DDB.  The "
"first, and earliest way is to use the boot flag `-d`.  The kernel will start "
"up in debug mode and enter DDB prior to any device probing.  Hence you can "
"even debug the device probe/attach functions.  To use this, exit the "
"loader's boot menu and enter `boot -d` at the loader prompt."
msgstr ""
"После загрузки ядра DDB существует несколько способов войти в него. Первый и "
"самый ранний способ — использовать флаг загрузки `-d`. Ядро запустится в "
"режиме отладки и перейдет в DDB до начала обнаружения любого из устройств. "
"Таким образом, можно отлаживать даже функции обнаружить (probe)/ "
"присоединить (attach) устройств. Для использования этого метода выйдите из "
"меню загрузки загрузчика и введите `boot -d` в командной строке загрузчика."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:342
msgid ""
"The second scenario is to drop to the debugger once the system has booted.  "
"There are two simple ways to accomplish this.  If you would like to break to "
"the debugger from the command prompt, simply type the command:"
msgstr ""
"Второй сценарий — перейти в отладчик после загрузки системы. Есть два "
"простых способа это сделать. Если вы хотите перейти в отладчик из командной "
"строки, просто введите команду:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:346
#, no-wrap
msgid "# sysctl debug.kdb.enter=1\n"
msgstr "# sysctl debug.kdb.enter=1\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:353
msgid ""
"Alternatively, if you are at the system console, you may use a hot-key on "
"the keyboard.  The default break-to-debugger sequence is kbd:[Ctrl+Alt"
"+ESC].  For syscons, this sequence can be remapped and some of the "
"distributed maps out there do this, so check to make sure you know the right "
"sequence to use.  There is an option available for serial consoles that "
"allows the use of a serial line BREAK on the console line to enter DDB "
"(`options BREAK_TO_DEBUGGER` in the kernel config file).  It is not the "
"default since there are a lot of serial adapters around that gratuitously "
"generate a BREAK condition, for example when pulling the cable."
msgstr ""
"В качестве альтернативы, если вы находитесь за системной консолью, можно "
"использовать горячую клавишу на клавиатуре. Стандартной комбинацией для "
"перехода в отладчик является kbd:[Ctrl+Alt+ESC]. В syscons эта "
"последовательность может быть переназначена, и некоторые распространённые "
"раскладки клавиатуры делают это, поэтому убедитесь, что знаете правильную "
"комбинацию. Для последовательных консолей доступна опция, позволяющая "
"использовать сигнал BREAK на линии консоли для входа в DDB (`options "
"BREAK_TO_DEBUGGER` в конфигурационном файле ядра). Это не установлено по "
"умолчанию, так как существует множество последовательных адаптеров, которые "
"излишне генерируют условие BREAK, например, при отключении кабеля."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:356
msgid ""
"The third way is that any panic condition will branch to DDB if the kernel "
"is configured to use it.  For this reason, it is not wise to configure a "
"kernel with DDB for a machine running unattended."
msgstr ""
"Третий способ заключается в том, чтобы любое условие паники переходило в "
"DDB, если ядро настроено на его использование. По этой причине не "
"рекомендуется настраивать ядро с DDB для машины, работающей без присмотра."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:358
msgid "To obtain the unattended functionality, add:"
msgstr "Для получения неинтерактивной функциональности добавьте:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:362
#, no-wrap
msgid "options\tKDB_UNATTENDED\n"
msgstr "options\tKDB_UNATTENDED\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:365
msgid "to the kernel configuration file and rebuild/reinstall."
msgstr "в файл конфигурации ядра и пересоберите/переустановите ядро."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:368
msgid ""
"The DDB commands roughly resemble some `gdb` commands.  The first thing you "
"probably need to do is to set a breakpoint:"
msgstr ""
"Команды DDB примерно напоминают некоторые команды `gdb`. Первое, что вам, "
"вероятно, нужно сделать, это установить точку останова:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:372
#, no-wrap
msgid " break function-name address\n"
msgstr " break function-name address\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:377
msgid ""
"Numbers are taken hexadecimal by default, but to make them distinct from "
"symbol names; hexadecimal numbers starting with the letters `a-f` need to be "
"preceded with `0x` (this is optional for other numbers).  Simple expressions "
"are allowed, for example: `function-name + 0x103`."
msgstr ""
"Числа по умолчанию интерпретируются как шестнадцатеричные, но чтобы отличить "
"их от символьных имен, шестнадцатеричные числа, начинающиеся с букв `a-f`, "
"должны предваряться префиксом `0x` (для остальных чисел это необязательно). "
"Допускаются простые выражения, например: `function-name + 0x103`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:379
msgid "To exit the debugger and continue execution, type:"
msgstr "Для выхода из отладчика и продолжения выполнения введите:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:383
#, no-wrap
msgid " continue\n"
msgstr " continue\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:386
msgid "To get a stack trace of the current thread, use:"
msgstr "Для получения трассировки стека текущего потока используйте:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:390
#, no-wrap
msgid " trace\n"
msgstr " trace\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:393
msgid ""
"To get a stack trace of an arbitrary thread, specify a process ID or thread "
"ID as a second argument to `trace`."
msgstr ""
"Для получения трассировки стека произвольного потока укажите идентификатор "
"процесса или идентификатор потока в качестве второго аргумента команды "
"`trace`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:395
msgid "If you want to remove a breakpoint, use"
msgstr "Если вы хотите удалить точку останова, используйте"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:400
#, no-wrap
msgid ""
" del\n"
" del address-expression\n"
msgstr ""
" del\n"
" del address-expression\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:404
msgid ""
"The first form will be accepted immediately after a breakpoint hit, and "
"deletes the current breakpoint.  The second form can remove any breakpoint, "
"but you need to specify the exact address; this can be obtained from:"
msgstr ""
"Первая форма будет принята сразу после срабатывания точки останова и удаляет "
"текущую точку останова. Вторая форма может удалить любую точку останова, но "
"необходимо указать точный адрес; его можно получить из:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:408
#, no-wrap
msgid " show b\n"
msgstr " show b\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:411
msgid "or:"
msgstr "или:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:415
#, no-wrap
msgid " show break\n"
msgstr " show break\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:418
msgid "To single-step the kernel, try:"
msgstr "Для пошагового выполнения ядра попробуйте:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:422
#, no-wrap
msgid " s\n"
msgstr " s\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:425
msgid ""
"This will step into functions, but you can make DDB trace them until the "
"matching return statement is reached by:"
msgstr ""
"Это позволит войти в функции, но вы можете заставить DDB отслеживать их до "
"достижения соответствующего оператора return с помощью:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:429
#, no-wrap
msgid " n\n"
msgstr " n\n"

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:435
msgid ""
"This is different from ``gdb``'s `next` statement; it is like ``gdb``'s "
"`finish`.  Pressing kbd:[n] more than once will cause a continue."
msgstr ""
"Это отличается от оператора `next` в ``gdb``; это похоже на `finish` в "
"``gdb``. Нажатие kbd:[n] более одного раза приведёт к продолжению."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:438
msgid "To examine data from memory, use (for example):"
msgstr "Для просмотра данных в памяти используйте (например):"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:445
#, no-wrap
msgid ""
" x/wx 0xf0133fe0,40\n"
" x/hd db_symtab_space\n"
" x/bc termbuf,10\n"
" x/s stringbuf\n"
msgstr ""
" x/wx 0xf0133fe0,40\n"
" x/hd db_symtab_space\n"
" x/bc termbuf,10\n"
" x/s stringbuf\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:450
msgid ""
"for word/halfword/byte access, and hexadecimal/decimal/character/ string "
"display.  The number after the comma is the object count.  To display the "
"next 0x10 items, simply use:"
msgstr ""
"для доступа к словам/полусловам/байтам и отображения в шестнадцатеричном/"
"десятичном/символьном/строковом формате. Число после запятой указывает "
"количество объектов. Для отображения следующих 0x10 элементов просто введите:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:454
#, no-wrap
msgid " x ,10\n"
msgstr " x ,10\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:457
msgid "Similarly, use"
msgstr "Аналогично, используйте"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:461
#, no-wrap
msgid " x/ia foofunc,10\n"
msgstr " x/ia foofunc,10\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:464
msgid ""
"to disassemble the first 0x10 instructions of `foofunc`, and display them "
"along with their offset from the beginning of `foofunc`."
msgstr ""
"для дизассемблирования первых 0x10 инструкций функции `foofunc` и их "
"отображения вместе с их смещением от начала `foofunc`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:466
msgid "To modify memory, use the write command:"
msgstr "Для записи в память используйте команду write:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:471
#, no-wrap
msgid ""
" w/b termbuf 0xa 0xb 0\n"
" w/w 0xf0010030 0 0\n"
msgstr ""
" w/b termbuf 0xa 0xb 0\n"
" w/w 0xf0010030 0 0\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:475
msgid ""
"The command modifier (`b`/`h`/`w`) specifies the size of the data to be "
"written, the first following expression is the address to write to and the "
"remainder is interpreted as data to write to successive memory locations."
msgstr ""
"Модификатор команды (`b`/`h`/`w`) определяет размер данных для записи, "
"первое следующее выражение — это адрес для записи, а остальное "
"интерпретируется как данные для записи в последующие ячейки памяти."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:477
msgid "If you need to know the current registers, use:"
msgstr "Если вам необходимо узнать текущее содержимое регистров, введите:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:481
#, no-wrap
msgid " show reg\n"
msgstr " show reg\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:484
msgid "Alternatively, you can display a single register value by e.g."
msgstr "Также можно отобразить значение одного регистра, например:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:488
#, no-wrap
msgid " p $eax\n"
msgstr " p $eax\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:491
msgid "and modify it by:"
msgstr "и изменить его с помощью:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:495
#, no-wrap
msgid " set $eax new-value\n"
msgstr " set $eax new-value\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:498
msgid "Should you need to call some kernel functions from DDB, simply say:"
msgstr ""
"Если вам потребуется вызвать некоторые функции ядра из DDB, просто напишите:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:502
#, no-wrap
msgid " call func(arg1, arg2, ...)\n"
msgstr " call func(arg1, arg2, ...)\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:505
msgid "The return value will be printed."
msgstr "Будет выведено возвращаемое значение."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:507
msgid "For a man:ps[1] style summary of all running processes, use:"
msgstr ""
"Для вывода информации о всех запущенных процессах в стиле man:ps[1] "
"используйте:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:511
#, no-wrap
msgid " ps\n"
msgstr " ps\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:516
msgid ""
"Now you have examined why your kernel failed, and you wish to reboot.  "
"Remember that, depending on the severity of previous malfunctioning, not all "
"parts of the kernel might still be working as expected.  Perform one of the "
"following actions to shut down and reboot your system:"
msgstr ""
"Теперь вы выяснили причину сбоя ядра и хотите выполнить перезагрузку. "
"Помните, что в зависимости от серьезности предыдущего сбоя не все части ядра "
"могут работать корректно. Выполните одно из следующих действий для "
"завершения работы и перезагрузки системы:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:520
#, no-wrap
msgid " panic\n"
msgstr " panic\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:523
msgid ""
"This will cause your kernel to dump core and reboot, so you can later "
"analyze the core on a higher level with man:kgdb[1]."
msgstr ""
"Это приведёт к дампу ядра и перезагрузке, чтобы позже можно было "
"проанализировать дамп на более высоком уровне с помощью man:kgdb[1]."

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:527
#, no-wrap
msgid " call boot(0)\n"
msgstr " call boot(0)\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:531
msgid ""
"Might be a good way to cleanly shut down the running system, `sync()` all "
"disks, and finally, in some cases, reboot.  As long as the disk and "
"filesystem interfaces of the kernel are not damaged, this could be a good "
"way for an almost clean shutdown."
msgstr ""
"Может быть хорошим способом чисто завершить работу работающей системы, "
"`sync()` все диски и, наконец, в некоторых случаях перезагрузиться. Пока "
"интерфейсы дисков и файловых систем ядра не повреждены, это может быть "
"хорошим способом для почти чистого завершения работы."

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:535
#, no-wrap
msgid " reset\n"
msgstr " reset\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:538
msgid ""
"This is the final way out of disaster and almost the same as hitting the Big "
"Red Button."
msgstr ""
"Это последний способ избежать катастрофы, и он почти такой же, как нажатие "
"на Большую Красную Кнопку."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:540
msgid "If you need a short command summary, simply type:"
msgstr "Если вам нужна краткая сводка команд, просто введите:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:544
#, no-wrap
msgid " help\n"
msgstr " help\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:548
msgid ""
"It is highly recommended to have a printed copy of the man:ddb[4] manual "
"page ready for a debugging session.  Remember that it is hard to read the on-"
"line manual while single-stepping the kernel."
msgstr ""
"Настоятельно рекомендуется иметь распечатанную копию страницы руководства "
"man:ddb[4] для сеанса отладки. Помните, что читать онлайн-руководство во "
"время пошагового выполнения ядра сложно."

#. type: Title ==
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:550
#, no-wrap
msgid "On-Line Kernel Debugging Using Remote GDB"
msgstr "Онлайн-отладка ядра с использованием удалённого GDB"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:553
msgid ""
"The FreeBSD kernel provides a second KDB backend for on-line debugging: man:"
"gdb[4]."
msgstr ""
"Ядро FreeBSD предоставляет второй бэкенд KDB для отладки в реальном времени: "
"man:gdb[4]."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:559
msgid ""
"GDB has supported _remote debugging_ for a long time.  This is done using a "
"very simple protocol along a serial line.  Unlike the other debugging "
"methods described above, you will need two machines for doing this.  One is "
"the host providing the debugging environment, including all the sources, and "
"a copy of the kernel binary with all the symbols in it.  The other is the "
"target machine that runs a copy of the very same kernel (optionally stripped "
"of the debugging information)."
msgstr ""
"GDB давно поддерживает _удалённую отладку_. Это осуществляется с помощью "
"очень простого протокола через последовательное соединение. В отличие от "
"других методов отладки, описанных выше, для этого потребуются две машины. "
"Одна — это хост, предоставляющий среду отладки, включая все исходные тексты "
"и копию бинарного файла ядра со всеми символами. Другая — целевая машина, на "
"которой запущена копия того же самого ядра (возможно, без отладочной "
"информации)."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:561
msgid ""
"In order to use remote GDB, ensure that the following options are present in "
"your kernel configuration:"
msgstr ""
"Чтобы использовать удалённый GDB, убедитесь, что следующие параметры "
"присутствуют в конфигурации вашего ядра:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:566
#, no-wrap
msgid ""
"makeoptions     DEBUG=-g\n"
"options         KDB\n"
"options         GDB\n"
msgstr ""
"makeoptions     DEBUG=-g\n"
"options         KDB\n"
"options         GDB\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:569
msgid ""
"Note that the `GDB` option is turned off by default in `GENERIC` kernels on -"
"STABLE and -RELEASE branches, but enabled on -CURRENT."
msgstr ""
"Обратите внимание, что опция `GDB` отключена по умолчанию в ядрах `GENERIC` "
"для веток -STABLE и -RELEASE, но включена в -CURRENT."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:573
msgid ""
"Once built, copy the kernel to the target machine, and boot it.  Connect the "
"serial line of the target machine that has \"flags 080\" set on its uart "
"device to any serial line of the debugging host.  See man:uart[4] for "
"information on how to set the flags on a uart device."
msgstr ""
"После сборки скопируйте ядро на целевую машину и загрузите его. Подключите "
"последовательный порт целевой машины, у которого на устройстве uart "
"установлены флаги \"080\", к любому последовательному порту отладочной "
"машины. Подробности о настройке флагов на устройстве uart смотрите в man:"
"uart[4]."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:576
msgid ""
"The target machine must be made to enter the GDB backend, either due to a "
"panic or by taking a purposeful trap into the debugger.  Before doing this, "
"select the GDB debugger backend:"
msgstr ""
"Целевая машина должна быть переведена в режим отладчика GDB, либо из-за "
"паники, либо путем преднамеренного перехода в отладчик. Перед этим выберите "
"бэкенд отладчика GDB:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:580
#, no-wrap
msgid ""
"# sysctl debug.kdb.current=gdb\n"
"debug.kdb.current: ddb -> gdb\n"
msgstr ""
"# sysctl debug.kdb.current=gdb\n"
"debug.kdb.current: ddb -> gdb\n"

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:587
msgid ""
"The supported backends can be listed by the `debug.kdb.available` sysctl.  "
"If the kernel configuration includes `options DDB`, then man:ddb[4] will be "
"selected by default.  If `gdb` does not appear in the list of available "
"backends, then the debug serial port may not have been configured correctly."
msgstr ""
"Поддерживаемые бэкенды можно вывести с помощью sysctl `debug.kdb.available`. "
"Если конфигурация ядра включает `options DDB`, то man:ddb[4] будет выбран по "
"умолчанию. Если `gdb` не отображается в списке доступных бэкендов, значит, "
"последовательный порт отладки может быть настроен неправильно."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:590
msgid "Then, force entry to the debugger:"
msgstr "Затем принудительно войдите в отладчик:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:594
#, no-wrap
msgid ""
"# sysctl debug.kdb.enter=1\n"
"debug.kdb.enter: 0KDB: enter: sysctl debug.kdb.enter\n"
msgstr ""
"# sysctl debug.kdb.enter=1\n"
"debug.kdb.enter: 0KDB: enter: sysctl debug.kdb.enter\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:598
msgid ""
"The target machine now awaits connection from a remote GDB client.  On the "
"debugging machine, go to the compile directory of the target kernel, and "
"start `gdb`:"
msgstr ""
"Целевая машина теперь ожидает подключения от удалённого клиента GDB. На "
"машине для отладки перейдите в каталог сборки целевого ядра и запустите "
"`gdb`:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:609
#, no-wrap
msgid ""
"# cd /usr/obj/usr/src/amd64.amd64/sys/GENERIC/\n"
"# kgdb kernel\n"
"GNU gdb (GDB) 10.2 [GDB v10.2 for FreeBSD]\n"
"Copyright (C) 2021 Free Software Foundation, Inc.\n"
"...\n"
"Reading symbols from kernel...\n"
"Reading symbols from /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.debug...\n"
"(kgdb)\n"
msgstr ""
"# cd /usr/obj/usr/src/amd64.amd64/sys/GENERIC/\n"
"# kgdb kernel\n"
"GNU gdb (GDB) 10.2 [GDB v10.2 for FreeBSD]\n"
"Copyright (C) 2021 Free Software Foundation, Inc.\n"
"...\n"
"Reading symbols from kernel...\n"
"Reading symbols from /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.debug...\n"
"(kgdb)\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:612
msgid ""
"Initialize the remote debugging session (assuming the first serial port is "
"being used) by:"
msgstr ""
"Инициализируйте сеанс удалённой отладки (предполагая, что используется "
"первый последовательный порт) с помощью:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:616
#, no-wrap
msgid "(kgdb) target remote /dev/cuau0\n"
msgstr "(kgdb) target remote /dev/cuau0\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:619
msgid "Your hosting GDB will now gain control over the target kernel:"
msgstr "Ваш хостинг GDB теперь получит контроль над целевым ядром:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:626
#, no-wrap
msgid ""
"Remote debugging using /dev/cuau0\n"
"kdb_enter (why=<optimized out>, msg=<optimized out>) at /usr/src/sys/kern/subr_kdb.c:506\n"
"506                     kdb_why = KDB_WHY_UNSET;\n"
"(kgdb)\n"
msgstr ""
"Remote debugging using /dev/cuau0\n"
"kdb_enter (why=<optimized out>, msg=<optimized out>) at /usr/src/sys/kern/subr_kdb.c:506\n"
"506                     kdb_why = KDB_WHY_UNSET;\n"
"(kgdb)\n"

#. type: delimited block = 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:634
msgid ""
"Depending on the compiler used, some local variables may appear as "
"`<optimized out>`, preventing them from being inspected directly by `gdb`.  "
"If this causes problems while debugging, it is possible to build the kernel "
"at a decreased optimization level, which may improve the visibility of some "
"variables.  This can be done by passing `COPTFLAGS=-O1` to man:make[1].  "
"However, certain classes of kernel bugs may manifest differently (or not at "
"all) when the optimization level is changed."
msgstr ""
"В зависимости от используемого компилятора, некоторые локальные переменные "
"могут отображаться как `<optimized out>`, что не позволяет их напрямую "
"исследовать с помощью `gdb`. Если это вызывает проблемы при отладке, можно "
"собрать ядро с пониженным уровнем оптимизации, что может улучшить видимость "
"некоторых переменных. Это можно сделать, передав `COPTFLAGS=-O1` в man:"
"make[1]. Однако определённые классы ошибок в ядре могут проявляться иначе "
"(или вообще не проявляться) при изменении уровня оптимизации."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:638
msgid ""
"You can use this session almost as any other GDB session, including full "
"access to the source, running it in gud-mode inside an Emacs window (which "
"gives you an automatic source code display in another Emacs window), etc."
msgstr ""
"Вы можете использовать этот сеанс почти как любой другой сеанс GDB, включая "
"полный доступ к исходному коду, запуск в режиме gud (Grand Unified Debugger) "
"внутри окна Emacs (что даёт автоматическое отображение исходного кода в "
"другом окне Emacs) и т.д."

#. type: Title ==
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:640
#, no-wrap
msgid "Debugging a Console Driver"
msgstr "Отладка драйвера консоли"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:646
msgid ""
"Since you need a console driver to run DDB on, things are more complicated "
"if the console driver itself is failing.  You might remember the use of a "
"serial console (either with modified boot blocks, or by specifying `-h` at "
"the `Boot:` prompt), and hook up a standard terminal onto your first serial "
"port.  DDB works on any configured console driver, including a serial "
"console."
msgstr ""
"Поскольку для работы DDB требуется драйвер консоли, ситуация усложняется, "
"если сам драйвер консоли неисправен. Возможно, вы вспомните о возможности "
"использования последовательной консоли (либо с модифицированными "
"загрузочными блоками, либо указав `-h` в строке `Boot:`), подключив "
"стандартный терминал к первому последовательному порту. DDB работает с любым "
"настроенным драйвером консоли, включая последовательную консоль."

#. type: Title ==
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:648
#, no-wrap
msgid "Debugging Deadlocks"
msgstr "Отладка взаимоблокировок"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:653
msgid ""
"You may experience so called deadlocks, a situation where a system stops "
"doing useful work.  To provide a helpful bug report in this situation, use "
"man:ddb[4] as described in the previous section.  Include the output of `ps` "
"and `trace` for suspected processes in the report."
msgstr ""
"Вы можете столкнуться с так называемыми взаимоблокировками — ситуацией, "
"когда система перестает выполнять полезную работу. Чтобы предоставить "
"полезный отчёт об ошибке в такой ситуации, используйте man:ddb[4], как "
"описано в предыдущем разделе. Включите в отчёт вывод команд `ps` и `trace` "
"для подозрительных процессов."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:657
msgid ""
"If possible, consider doing further investigation.  The recipe below is "
"especially useful if you suspect that a deadlock occurs in the VFS layer.  "
"Add these options to the kernel configuration file."
msgstr ""
"Если возможно, рассмотрите проведение дополнительного исследования. "
"Приведенный ниже рецепт особенно полезен, если вы подозреваете, что взаимная "
"блокировка происходит на уровне VFS. Добавьте следующие параметры в файл "
"конфигурации ядра."

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:668
#, no-wrap
msgid ""
"makeoptions \tDEBUG=-g\n"
"options \tINVARIANTS\n"
"options \tINVARIANT_SUPPORT\n"
"options \tWITNESS\n"
"options \tWITNESS_SKIPSPIN\n"
"options \tDEBUG_LOCKS\n"
"options \tDEBUG_VFS_LOCKS\n"
"options \tDIAGNOSTIC\n"
msgstr ""
"makeoptions \tDEBUG=-g\n"
"options \tINVARIANTS\n"
"options \tINVARIANT_SUPPORT\n"
"options \tWITNESS\n"
"options \tWITNESS_SKIPSPIN\n"
"options \tDEBUG_LOCKS\n"
"options \tDEBUG_VFS_LOCKS\n"
"options \tDIAGNOSTIC\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:671
msgid ""
"When a deadlock occurs, in addition to the output of the `ps` command, "
"provide information from the `show pcpu`, `show allpcpu`, `show locks`, "
"`show alllocks`, `show lockedvnods` and `alltrace`."
msgstr ""
"При возникновении взаимоблокировки, помимо вывода команды `ps`, предоставьте "
"информацию из `show pcpu`, `show allpcpu`, `show locks`, `show alllocks`, "
"`show lockedvnods` и `alltrace`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:673
msgid ""
"To obtain meaningful backtraces for threaded processes, use `thread thread-"
"id` to switch to the thread stack, and do a backtrace with `where`."
msgstr ""
"Для получения осмысленных трассировок стека для потоковых процессов "
"используйте `thread thread-id` для переключения на стек потока и выполните "
"трассировку с помощью `where`."

#. type: Title ==
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:675
#, no-wrap
msgid "Kernel debugging with Dcons"
msgstr "Отладка ядра с помощью Dcons"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:681
msgid ""
"man:dcons[4] is a very simple console driver that is not directly connected "
"with any physical devices.  It just reads and writes characters from and to "
"a buffer in a kernel or loader.  Due to its simple nature, it is very useful "
"for kernel debugging, especially with a FireWire(R) device.  Currently, "
"FreeBSD provides two ways to interact with the buffer from outside of the "
"kernel using man:dconschat[8]."
msgstr ""
"man:dcons[4] — это очень простой драйвер консоли, который не связан напрямую "
"с какими-либо физическими устройствами. Он просто читает и записывает "
"символы из буфера в ядре или загрузчике и обратно. Благодаря своей простоте "
"он очень полезен для отладки ядра, особенно с устройством FireWire(R). В "
"настоящее время FreeBSD предоставляет два способа взаимодействия с буфером "
"извне ядра с помощью man:dconschat[8]."

#. type: Title ===
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:682
#, no-wrap
msgid "Dcons over FireWire(R)"
msgstr "Dcons через FireWire(R)"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:690
msgid ""
"Most FireWire(R) (IEEE1394) host controllers are based on the OHCI "
"specification that supports physical access to the host memory.  This means "
"that once the host controller is initialized, we can access the host memory "
"without the help of software (kernel).  We can exploit this facility for "
"interaction with man:dcons[4].  man:dcons[4] provides similar functionality "
"as a serial console.  It emulates two serial ports, one for the console and "
"DDB, the other for GDB.  Since remote memory access is fully handled by the "
"hardware, the man:dcons[4] buffer is accessible even when the system crashes."
msgstr ""
"Большинство контроллеров FireWire(R) (IEEE1394) основаны на спецификации "
"OHCI, которая поддерживает физический доступ к памяти хоста. Это означает, "
"что после инициализации контроллера хоста мы можем получить доступ к памяти "
"хоста без помощи программного обеспечения (ядра). Мы можем использовать эту "
"возможность для взаимодействия с man:dcons[4]. man:dcons[4] предоставляет "
"функциональность, аналогичную последовательной консоли. Он эмулирует два "
"последовательных порта: один для консоли и DDB, другой для GDB. Поскольку "
"удалённый доступ к памяти полностью обрабатывается аппаратным обеспечением, "
"буфер man:dcons[4] остаётся доступным даже при крахе системы."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:693
msgid ""
"FireWire(R) devices are not limited to those integrated into motherboards.  "
"PCI cards exist for desktops, and a cardbus interface can be purchased for "
"laptops."
msgstr ""
"Устройства FireWire(R) не только встраиваются в материнские платы. Для "
"настольных компьютеров существуют PCI-карты, а для ноутбуков можно "
"приобрести интерфейс CardBus."

#. type: Title ====
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:694
#, no-wrap
msgid "Enabling FireWire(R) and Dcons support on the target machine"
msgstr "Включение поддержки FireWire(R) и Dcons на целевой машине"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:697
msgid ""
"To enable FireWire(R) and Dcons support in the kernel of the _target "
"machine_:"
msgstr "Чтобы включить поддержку FireWire(R) и Dcons в ядре _целевой машины_:"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:699
msgid ""
"Make sure your kernel supports `dcons`, `dcons_crom` and `firewire`. `Dcons` "
"should be statically linked with the kernel. For `dcons_crom` and "
"`firewire`, modules should be OK."
msgstr ""
"Убедитесь, что ваше ядро поддерживает `dcons`, `dcons_crom` и `firewire`. "
"`Dcons` должен быть статически связан с ядром. Для `dcons_crom` и `firewire` "
"модули должны подойти."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:700
msgid ""
"Make sure physical DMA is enabled. You may need to add `hw.firewire."
"phydma_enable=1` to [.filename]#/boot/loader.conf#."
msgstr ""
"Убедитесь, что физический DMA включен. Возможно, потребуется добавить `hw."
"firewire.phydma_enable=1` в [.filename]#/boot/loader.conf#."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:701
msgid "Add options for debugging."
msgstr "Добавьте параметры для отладки."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:702
msgid ""
"Add `dcons_gdb=1` in [.filename]#/boot/loader.conf# if you use GDB over "
"FireWire(R)."
msgstr ""
"Добавьте `dcons_gdb=1` в [.filename]#/boot/loader.conf#, если вы используете "
"GDB через FireWire(R)."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:703
msgid "Enable `dcons` in [.filename]#/etc/ttys#."
msgstr "Включите `dcons` в [.filename]#/etc/ttys#."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:704
msgid ""
"Optionally, to force `dcons` to be the high-level console, add `hw.firewire."
"dcons_crom.force_console=1` to [.filename]#loader.conf#."
msgstr ""
"Это необязательно: чтобы принудительно сделать `dcons` высокоуровневой "
"консолью, добавьте `hw.firewire.dcons_crom.force_console=1` в [."
"filename]#loader.conf#."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:706
msgid ""
"To enable FireWire(R) and Dcons support in man:loader[8] on i386 or amd64:"
msgstr ""
"Чтобы включить поддержку FireWire(R) и Dcons в man:loader[8] на i386 или "
"amd64:"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:708
msgid ""
"Add `LOADER_FIREWIRE_SUPPORT=YES` in [.filename]#/etc/make.conf# and rebuild "
"man:loader[8]:"
msgstr ""
"Добавьте `LOADER_FIREWIRE_SUPPORT=YES` в [.filename]#/etc/make.conf# и "
"пересоберите man:loader[8]:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:712
#, no-wrap
msgid "# cd /sys/boot/i386 && make clean && make && make install\n"
msgstr "# cd /sys/boot/i386 && make clean && make && make install\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:715
msgid ""
"To enable man:dcons[4] as an active low-level console, add `boot_multicons="
"\"YES\"` to [.filename]#/boot/loader.conf#."
msgstr ""
"Чтобы включить man:dcons[4] в качестве активной низкоуровневой консоли, "
"добавьте `boot_multicons=\"YES\"` в [.filename]#/boot/loader.conf#."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:718
msgid ""
"Here are a few configuration examples.  A sample kernel configuration file "
"would contain:"
msgstr ""
"Вот несколько примеров конфигурации. Образец файла конфигурации ядра может "
"содержать:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:727
#, no-wrap
msgid ""
"device dcons\n"
"device dcons_crom\n"
"options KDB\n"
"options DDB\n"
"options GDB\n"
"options ALT_BREAK_TO_DEBUGGER\n"
msgstr ""
"device dcons\n"
"device dcons_crom\n"
"options KDB\n"
"options DDB\n"
"options GDB\n"
"options ALT_BREAK_TO_DEBUGGER\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:730
msgid "And a sample [.filename]#/boot/loader.conf# would contain:"
msgstr "И образец [.filename]#/boot/loader.conf# может содержать:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:738
#, no-wrap
msgid ""
"dcons_crom_load=\"YES\"\n"
"dcons_gdb=1\n"
"boot_multicons=\"YES\"\n"
"hw.firewire.phydma_enable=1\n"
"hw.firewire.dcons_crom.force_console=1\n"
msgstr ""
"dcons_crom_load=\"YES\"\n"
"dcons_gdb=1\n"
"boot_multicons=\"YES\"\n"
"hw.firewire.phydma_enable=1\n"
"hw.firewire.dcons_crom.force_console=1\n"

#. type: Title ====
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:740
#, no-wrap
msgid "Enabling FireWire(R) and Dcons support on the host machine"
msgstr "Включение поддержки FireWire(R) и Dcons на главной машине"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:743
msgid "To enable FireWire(R) support in the kernel on the _host machine_:"
msgstr "Чтобы включить поддержку FireWire(R) в ядре на _основной машине_:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:747
#, no-wrap
msgid "# kldload firewire\n"
msgstr "# kldload firewire\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:750
msgid ""
"Find out the EUI64 (the unique 64 bit identifier) of the FireWire(R) host "
"controller, and use man:fwcontrol[8] or `dmesg` to find the EUI64 of the "
"target machine."
msgstr ""
"Определите EUI64 (уникальный 64-битный идентификатор) контроллера "
"FireWire(R) и используйте man:fwcontrol[8] или `dmesg`, чтобы найти EUI64 "
"целевой машины."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:752
msgid "Run man:dconschat[8], with:"
msgstr "Запустите man:dconschat[8], с:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:756
#, no-wrap
msgid "# dconschat -e \\# -br -G 12345 -t 00-11-22-33-44-55-66-77\n"
msgstr "# dconschat -e \\# -br -G 12345 -t 00-11-22-33-44-55-66-77\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:759
msgid ""
"The following key combinations can be used once man:dconschat[8] is running:"
msgstr ""
"Следующие комбинации клавиш могут быть использованы после запуска man:"
"dconschat[8]:"

#. type: Table
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:765
#, no-wrap
msgid "kbd:[~+.]"
msgstr "kbd:[~+.]"

#. type: Table
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:767
#, no-wrap
msgid "Disconnect"
msgstr "Отсоединиться"

#. type: Table
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:768
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:771
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:774
#, no-wrap
msgid "kbd:[~]"
msgstr "kbd:[~]"

#. type: Table
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:770
#, no-wrap
msgid "ALT BREAK"
msgstr "ALT BREAK"

#. type: Table
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:773
#, no-wrap
msgid "RESET target"
msgstr "ПЕРЕЗАГРУЗИТЬ (RESET) целевую машину"

#. type: Table
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:775
#, no-wrap
msgid "Suspend dconschat"
msgstr "Приостановить dconschat"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:778
msgid ""
"Attach remote GDB by starting man:kgdb[1] with a remote debugging session:"
msgstr ""
"Присоедините удалённый GDB, запустив man:kgdb[1] с сеансом удалённой отладки:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:782
#, no-wrap
msgid " kgdb -r :12345 kernel\n"
msgstr " kgdb -r :12345 kernel\n"

#. type: Title ====
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:784
#, no-wrap
msgid "Some general tips"
msgstr "Некоторые общие рекомендации"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:787
msgid "Here are some general tips:"
msgstr "Вот несколько общих советов:"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:789
msgid ""
"To take full advantage of the speed of FireWire(R), disable other slow "
"console drivers:"
msgstr ""
"Чтобы в полной мере использовать скорость FireWire(R), отключите другие "
"медленные драйверы консоли:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:794
#, no-wrap
msgid ""
"# conscontrol delete ttyd0\t     # serial console\n"
"# conscontrol delete consolectl\t# video/keyboard\n"
msgstr ""
"# conscontrol delete ttyd0\t     # serial console\n"
"# conscontrol delete consolectl\t# video/keyboard\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:797
msgid ""
"There exists a GDB mode for man:emacs[1]; this is what you will need to add "
"to your [.filename]#.emacs#:"
msgstr ""
"Существует режим GDB для man:emacs[1]; вот что нужно добавить в ваш [."
"filename]#.emacs#:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:804
#, no-wrap
msgid ""
"(setq gud-gdba-command-name \"kgdb -a -a -a -r :12345\")\n"
"(setq gdb-many-windows t)\n"
"(xterm-mouse-mode 1)\n"
"M-x gdba\n"
msgstr ""
"(setq gud-gdba-command-name \"kgdb -a -a -a -r :12345\")\n"
"(setq gdb-many-windows t)\n"
"(xterm-mouse-mode 1)\n"
"M-x gdba\n"

#. type: Title ===
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:806
#, no-wrap
msgid "Dcons with KVM"
msgstr "Dcons с KVM"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:810
msgid ""
"We can directly read the man:dcons[4] buffer via [.filename]#/dev/mem# for "
"live systems, and in the core dump for crashed systems.  These give you "
"similar output to `dmesg -a`, but the man:dcons[4] buffer includes more "
"information."
msgstr ""
"Мы можем напрямую читать буфер man:dcons[4] через [.filename]#/dev/mem# для "
"работающих систем и в дампе памяти для систем после аварии. Это даёт "
"аналогичный вывод команде `dmesg -a`, но буфер man:dcons[4] содержит больше "
"информации."

#. type: Title ====
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:811
#, no-wrap
msgid "Using Dcons with KVM"
msgstr "Использование Dcons с KVM"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:814
msgid "To use man:dcons[4] with KVM:"
msgstr "Для использования man:dcons[4] с KVM:"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:816
msgid "Dump a man:dcons[4] buffer of a live system:"
msgstr "Дамп буфера man:dcons[4] работающей системы:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:820
#, no-wrap
msgid "# dconschat -1\n"
msgstr "# dconschat -1\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:823
msgid "Dump a man:dcons[4] buffer of a crash dump:"
msgstr "Дамп буфера man:dcons[4] аварийного дампа:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:827
#, no-wrap
msgid "# dconschat -1 -M vmcore.XX\n"
msgstr "# dconschat -1 -M vmcore.XX\n"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:830
msgid "Live core debugging can be done via:"
msgstr "Отладка ядра в реальном времени может быть выполнена через:"

#. type: delimited block . 4
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:835
#, no-wrap
msgid ""
"# fwcontrol -m target_eui64\n"
"# kgdb kernel /dev/fwmem0.2\n"
msgstr ""
"# fwcontrol -m target_eui64\n"
"# kgdb kernel /dev/fwmem0.2\n"

#. type: Title ==
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:838
#, no-wrap
msgid "Glossary of Kernel Options for Debugging"
msgstr "Глоссарий параметров ядра для отладки"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:841
msgid ""
"This section provides a brief glossary of compile-time kernel options used "
"for debugging:"
msgstr ""
"В этом разделе представлен краткий глоссарий параметров ядра, указываемых "
"при компиляции и относящихся к отладке:"

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:843
msgid ""
"`options KDB`: compiles in the kernel debugger framework. Required for "
"`options DDB` and `options GDB`. Little or no performance overhead. By "
"default, the debugger will be entered on panic instead of an automatic "
"reboot."
msgstr ""
"`options KDB`: включает фреймворк отладки ядра. Необходим для `options DDB` "
"и `options GDB`. Практически не влияет на производительность. По умолчанию "
"отладчик будет запущен при панике вместо автоматической перезагрузки."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:844
msgid ""
"`options KDB_UNATTENDED`: change the default value of the `debug."
"debugger_on_panic` sysctl to 0, which controls whether the debugger is "
"entered on panic. When `options KDB` is not compiled into the kernel, the "
"behavior is to automatically reboot on panic; when it is compiled into the "
"kernel, the default behavior is to drop into the debugger unless `options "
"KDB_UNATTENDED` is compiled in. If you want to leave the kernel debugger "
"compiled into the kernel but want the system to come back up unless you're "
"on-hand to use the debugger for diagnostics, use this option."
msgstr ""
"`options KDB_UNATTENDED`: изменяет значение по умолчанию системной настройки "
"`debug.debugger_on_panic` на 0, что управляет входом в отладчик при панике. "
"Если `options KDB` не вкомпилировано в ядро, поведение по умолчанию — "
"автоматическая перезагрузка при панике; если оно вкомпилировано в ядро, "
"поведение по умолчанию — переход в отладчик, если не вкомпилирована опция "
"`options KDB_UNATTENDED`. Если вы хотите оставить отладчик ядра "
"вкомпилированным в ядро, но желаете, чтобы система перезагружалась, пока вы "
"не готовы использовать отладчик для диагностики, используйте эту опцию."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:845
msgid ""
"`options KDB_TRACE`: change the default value of the `debug.trace_on_panic` "
"sysctl to 1, which controls whether the debugger automatically prints a "
"stack trace on panic. Especially if running with `options KDB_UNATTENDED`, "
"this can be helpful to gather basic debugging information on the serial or "
"firewire console while still rebooting to recover."
msgstr ""
"`options KDB_TRACE`: изменяет значение по умолчанию системной настройки "
"`debug.trace_on_panic` на 1, что управляет автоматическим выводом "
"трассировки стека при панике. Особенно полезно при использовании с `options "
"KDB_UNATTENDED`, так как позволяет собрать базовую отладочную информацию на "
"последовательной консоли или консоли FireWire, продолжая перезагрузку для "
"восстановления."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:846
msgid ""
"`options DDB`: compile in support for the console debugger, DDB. This "
"interactive debugger runs on whatever the active low-level console of the "
"system is, which includes the video console, serial console, or firewire "
"console. It provides basic integrated debugging facilities, such as stack "
"tracing, process and thread listing, dumping of lock state, VM state, file "
"system state, and kernel memory management. DDB does not require software "
"running on a second machine or being able to generate a core dump or full "
"debugging kernel symbols, and provides detailed diagnostics of the kernel at "
"run-time. Many bugs can be fully diagnosed using only DDB output. This "
"option depends on `options KDB`."
msgstr ""
"`options DDB`: включает поддержку консольного отладчика DDB. Этот "
"интерактивный отладчик работает на активной низкоуровневой консоли системы, "
"включая видеоконсоль, последовательную консоль или консоль FireWire. Он "
"предоставляет базовые встроенные средства отладки, такие как трассировка "
"стека, список процессов и потоков, вывод состояния блокировок, состояния "
"виртуальной памяти, состояния файловой системы и управления ядром памяти. "
"DDB не требует работы программного обеспечения на второй машине или "
"возможности создания дампа памяти или полных символов отладки ядра, а также "
"предоставляет детальную диагностику ядра во время выполнения. Многие ошибки "
"могут быть полностью диагностированы с использованием только вывода DDB. Эта "
"опция зависит от `options KDB`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:847
msgid ""
"`options GDB`: compile in support for the remote debugger, GDB, which can "
"operate over serial cable or firewire. When the debugger is entered, GDB may "
"be attached to inspect structure contents, generate stack traces, etc. Some "
"kernel state is more awkward to access than in DDB, which is able to "
"generate useful summaries of kernel state automatically, such as "
"automatically walking lock debugging or kernel memory management structures, "
"and a second machine running the debugger is required. On the other hand, "
"GDB combines information from the kernel source and full debugging symbols, "
"and is aware of full data structure definitions, local variables, and is "
"scriptable. This option is not required to run GDB on a kernel core dump. "
"This option depends on `options KDB`."
msgstr ""
"`options GDB`: включает поддержку удалённого отладчика GDB, который может "
"работать через последовательный кабель или FireWire. При входе в отладчик "
"можно подключить GDB для проверки содержимого структур, генерации "
"трассировки стека и т.д. Некоторые состояния ядра сложнее исследовать, чем в "
"DDB, который способен автоматически создавать полезные сводки состояния "
"ядра, например, автоматически обходить структуры отладки блокировок или "
"управления памятью ядра, но для этого требуется вторая машина с запущенным "
"отладчиком. С другой стороны, GDB объединяет информацию из исходного кода "
"ядра и полных отладочных символов, знает полные определения структур данных, "
"локальные переменные и поддерживает написание скриптов. Эта опция не "
"требуется для запуска GDB на дампе памяти ядра. Данная опция зависит от "
"`options KDB`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:848
msgid ""
"`options BREAK_TO_DEBUGGER`, `options ALT_BREAK_TO_DEBUGGER`: allow a break "
"signal or alternative signal on the console to enter the debugger. If the "
"system hangs without a panic, this is a useful way to reach the debugger. "
"Due to the current kernel locking, a break signal generated on a serial "
"console is significantly more reliable at getting into the debugger, and is "
"generally recommended. This option has little or no performance impact."
msgstr ""
"`options BREAK_TO_DEBUGGER`, `options ALT_BREAK_TO_DEBUGGER`: позволяют "
"сигналу прерывания или альтернативному сигналу на консоли войти в отладчик. "
"Если система зависает без паники, это полезный способ попасть в отладчик. Из-"
"за текущей блокировки ядра сигнал прерывания, сгенерированный на "
"последовательной консоли, значительно надёжнее для входа в отладчик и обычно "
"рекомендуется. Данная опция оказывает незначительное или нулевое влияние на "
"производительность."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:849
msgid ""
"`options INVARIANTS`: compile into the kernel a large number of run-time "
"assertion checks and tests, which constantly test the integrity of kernel "
"data structures and the invariants of kernel algorithms. These tests can be "
"expensive, so are not compiled in by default, but help provide useful \"fail "
"stop\" behavior, in which certain classes of undesired behavior enter the "
"debugger before kernel data corruption occurs, making them easier to debug. "
"Tests include memory scrubbing and use-after-free testing, which is one of "
"the more significant sources of overhead. This option depends on `options "
"INVARIANT_SUPPORT`."
msgstr ""
"`options INVARIANTS`: включает в ядро большое количество проверок и тестов "
"во время выполнения, которые постоянно проверяют целостность структур данных "
"ядра и инварианты алгоритмов ядра. Эти тесты могут быть затратными, поэтому "
"по умолчанию не включены, но они помогают обеспечить полезное поведение "
"\"fail stop\", при котором определённые классы нежелательного поведения "
"попадают в отладчик до возникновения повреждения данных ядра, что упрощает "
"их отладку. Тесты включают в себя очистку памяти и проверку использования "
"после освобождения, что является одним из наиболее значимых источников "
"накладных расходов. Эта опция зависит от `options INVARIANT_SUPPORT`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:850
msgid ""
"`options INVARIANT_SUPPORT`: many of the tests present in `options "
"INVARIANTS` require modified data structures or additional kernel symbols to "
"be defined."
msgstr ""
"`options INVARIANT_SUPPORT`: многие тесты, присутствующие в `options "
"INVARIANTS`, требуют модифицированных структур данных или определения "
"дополнительных символов ядра."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:851
msgid ""
"`options WITNESS`: this option enables run-time lock order tracking and "
"verification, and is an invaluable tool for deadlock diagnosis. WITNESS "
"maintains a graph of acquired lock orders by lock type, and checks the graph "
"at each acquire for cycles (implicit or explicit). If a cycle is detected, a "
"warning and stack trace are generated to the console, indicating that a "
"potential deadlock might have occurred. WITNESS is required in order to use "
"the `show locks`, `show witness` and `show alllocks` DDB commands. This "
"debug option has significant performance overhead, which may be somewhat "
"mitigated through the use of `options WITNESS_SKIPSPIN`. Detailed "
"documentation may be found in man:witness[4]."
msgstr ""
"`options WITNESS`: эта опция включает отслеживание и проверку порядка "
"блокировок во время выполнения, что является неоценимым инструментом для "
"диагностики взаимоблокировок. WITNESS поддерживает граф полученных порядков "
"блокировок по типам блокировок и проверяет граф на каждом получении на "
"наличие циклов (явных или неявных). Если цикл обнаружен, на консоль "
"выводится предупреждение и трассировка стека, указывающие на возможное "
"возникновение взаимоблокировки. WITNESS необходим для использования команд "
"DDB `show locks`, `show witness` и `show alllocks`. Эта отладочная опция "
"создаёт значительную нагрузку на производительность, которую можно несколько "
"уменьшить с помощью `options WITNESS_SKIPSPIN`. Подробная документация "
"доступна в man:witness[4]."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:852
msgid ""
"`options WITNESS_SKIPSPIN`: disable run-time checking of spinlock lock order "
"with WITNESS. As spin locks are acquired most frequently in the scheduler, "
"and scheduler events occur often, this option can significantly speed up "
"systems running with WITNESS. This option depends on `options WITNESS`."
msgstr ""
"`options WITNESS_SKIPSPIN`: отключает проверку порядка блокировки spinlock "
"во время выполнения с WITNESS. Поскольку spin-блокировки чаще всего "
"захватываются в планировщике, а события планировщика происходят часто, эта "
"опция может значительно ускорить системы, работающие с WITNESS. Эта опция "
"зависит от `options WITNESS`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:853
msgid ""
"`options WITNESS_KDB`: change the default value of the `debug.witness.kdb` "
"sysctl to 1, which causes WITNESS to enter the debugger when a lock order "
"violation is detected, rather than simply printing a warning. This option "
"depends on `options WITNESS`."
msgstr ""
"`options WITNESS_KDB`: изменяет значение по умолчанию системной настройки "
"`debug.witness.kdb` на 1, что приводит к входу в отладчик при обнаружении "
"нарушения порядка блокировок вместо простого вывода предупреждения. Эта "
"опция зависит от `options WITNESS`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:854
msgid ""
"`options SOCKBUF_DEBUG`: perform extensive run-time consistency checking on "
"socket buffers, which can be useful for debugging both socket bugs and race "
"conditions in protocols and device drivers that interact with sockets. This "
"option significantly impacts network performance, and may change the timing "
"in device driver races."
msgstr ""
"`options SOCKBUF_DEBUG`: выполнять расширенную проверку согласованности "
"сокетных буферов во время выполнения, что может быть полезно для отладки как "
"ошибок в сокетах, так и состояний гонки в протоколах и драйверах устройств, "
"взаимодействующих с сокетами. Данная опция значительно влияет на "
"производительность сети и может изменить временные параметры в состояниях "
"гонки драйверов устройств."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:855
msgid ""
"`options DEBUG_VFS_LOCKS`: track lock acquisition points for lockmgr/vnode "
"locks, expanding the amount of information displayed by `show lockedvnods` "
"in DDB. This option has a measurable performance impact."
msgstr ""
"`options DEBUG_VFS_LOCKS`: отслеживает точки получения блокировок для "
"lockmgr/vnode, расширяя объём информации, отображаемой командой `show "
"lockedvnods` в DDB. Данная опция оказывает заметное влияние на "
"производительность."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:856
msgid ""
"`options DEBUG_MEMGUARD`: a replacement for the man:malloc[9] kernel memory "
"allocator that uses the VM system to detect reads or writes from allocated "
"memory after free. Details may be found in man:memguard[9]. This option has "
"a significant performance impact, but can be very helpful in debugging "
"kernel memory corruption bugs."
msgstr ""
"`options DEBUG_MEMGUARD`: замена для man:malloc[9], аллокатор памяти ядра, "
"который использует систему VM для обнаружения чтения или записи в "
"освобождённую память. Подробности можно найти в man:memguard[9]. Данная "
"опция значительно влияет на производительность, но может быть очень полезна "
"при отладке ошибок повреждения памяти ядра."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:857
msgid ""
"`options DIAGNOSTIC`: enable additional, more expensive diagnostic tests "
"along the lines of `options INVARIANTS`."
msgstr ""
"`options DIAGNOSTIC`: включает дополнительные, более затратные "
"диагностические тесты, аналогичные `options INVARIANTS`."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:858
msgid ""
"`options KASAN`: enable the Kernel Address Sanitizer. This enables compiler "
"instrumentation which can be used to detect invalid memory accesses in the "
"kernel, such as use-after-frees and buffer overflows. This largely "
"supersedes `options DEBUG_MEMGUARD`. See man:kasan[9] for details, and for "
"the currently supported platforms."
msgstr ""
"`options KASAN`: включает отладчик адресов ядра (Kernel Address Sanitizer). "
"Это включает инструментирование компилятора, которое может использоваться "
"для обнаружения недопустимых обращений к памяти в ядре, таких как "
"использование после освобождения и переполнение буфера. В значительной "
"степени заменяет `options DEBUG_MEMGUARD`. Подробности и список "
"поддерживаемых платформ см. в man:kasan[9]."

#. type: Plain text
#: documentation/content/en/books/developers-handbook/kerneldebug/_index.adoc:858
msgid ""
"`options KMSAN`: enable the Kernel Memory Sanitizer. This enables compiler "
"instrumentation which can be used to detect uses of uninitialized memory. "
"See man:kmsan[9] for details, and for the currently supported platforms."
msgstr ""
"`options KMSAN`: включить отладчик использования памяти ядра (Kernel Memory "
"Sanitizer). Это включает инструментирование компилятора, которое может "
"использоваться для обнаружения использования неинициализированной памяти. "
"Подробности и список поддерживаемых платформ см. в man:kmsan[9]."

#~ msgid "And for DDD ([.filename]#devel/ddd#):"
#~ msgstr "И для DDD ([.filename]#devel/ddd#):"

#, no-wrap
#~ msgid ""
#~ "# remote serial protocol\n"
#~ "LANG=C ddd --debugger kgdb -r :12345 kernel\n"
#~ "# live core debug\n"
#~ "LANG=C ddd --debugger kgdb kernel /dev/fwmem0.2\n"
#~ msgstr ""
#~ "# remote serial protocol\n"
#~ "LANG=C ddd --debugger kgdb -r :12345 kernel\n"
#~ "# live core debug\n"
#~ "LANG=C ddd --debugger kgdb kernel /dev/fwmem0.2\n"