Debugger

Winpdb debugging itself

A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display or modify the contents of memory, CPU registers, and stack frames.

The code to be examined might alternatively be running on an instruction set simulator (ISS), a technique that allows great power in its ability to halt when specific conditions are encountered, but which will typically be somewhat slower than executing the code directly on the appropriate (or the same) processor. Some debuggers offer two modes of operation, full or partial simulation, to limit this impact.

A "trap" occurs when the program cannot normally continue because of a programming bug or invalid data. For example, the program might have tried to use an instruction not available on the current version of the CPU or attempted to access unavailable or protected memory. When the program "traps" or reaches a preset condition, the debugger typically shows the location in the original code if it is a source-level debugger or symbolic debugger, commonly now seen in integrated development environments. If it is a low-level debugger or a machine-language debugger it shows the line in the disassembly (unless it also has online access to the original source code and can display the appropriate section of code from the assembly or compilation).

Features

Typically, debuggers offer a query processor, a symbol resolver, an expression interpreter, and a debug support interface at its top level.[1] Debuggers also offer more sophisticated functions such as running a program step by step (single-stepping or program animation), stopping (breaking) (pausing the program to examine the current state) at some event or specified instruction by means of a breakpoint, and tracking the values of variables.[2] Some debuggers have the ability to modify the program state while it is running. It may also be possible to continue execution at a different location in the program to bypass a crash or logical error.

The same functionality which makes a debugger useful for correcting bugs allows it to be used as a software cracking tool to evade copy protection, digital rights management, and other software protection features. It often also makes it useful as a general verification tool, fault coverage, and performance analyzer, especially if instruction path lengths are shown.[3] Early microcomputers with disk-based storage often benefitted from the ability to diagnose and recover corrupted directory or registry data records, to "undelete" files marked as deleted, or to crack file password protection.

Most mainstream debugging engines, such as gdb and dbx, provide console-based command line interfaces. Debugger front-ends are popular extensions to debugger engines that provide IDE integration, program animation, and visualization features.

Record and replay debugging

Record and replay debugging,[4] also known as "software flight recording" or "program execution recording", captures application state changes and stores them to disk as each instruction in a program executes. The recording can then be replayed over and over, and interactively debugged to diagnose and resolve defects. Record and replay debugging is very useful for remote debugging and for resolving intermittent, non-deterministic, and other hard-to-reproduce defects.

Reverse debugging

Some debuggers include a feature called "reverse debugging", also known as "historical debugging" or "backwards debugging". These debuggers make it possible to step a program's execution backwards in time. Various debuggers include this feature. Microsoft Visual Studio (2010 Ultimate edition, 2012 Ultimate, 2013 Ultimate, and 2015 Enterprise edition) offers IntelliTrace reverse debugging for C#, Visual Basic .NET, and some other languages, but not C++. Reverse debuggers also exist for C, C++, Java, Python, Perl, and other languages. Some are open source; some are proprietary commercial software. Some reverse debuggers slow down the target by orders of magnitude, but the best reverse debuggers cause a slowdown of 2× or less. Reverse debugging is very useful for certain types of problems, but is still not commonly used yet.[5]

Time Travel debugging

In addition to the features of reverse debuggers, time travel debugging also allow users to interact with the program, changing the history if desired, and watch how the program responds.

Language dependency

Some debuggers operate on a single specific language while others can handle multiple languages transparently. For example, if the main target program is written in COBOL but calls assembly language subroutines and PL/1 subroutines, the debugger may have to dynamically switch modes to accommodate the changes in language as they occur.

Memory protection

Some debuggers also incorporate memory protection to avoid storage violations such as buffer overflow. This may be extremely important in transaction processing environments where memory is dynamically allocated from memory 'pools' on a task by task basis.

Hardware support for debugging

Most modern microprocessors have at least one of these features in their CPU design to make debugging easier:

  • Hardware support for single-stepping a program, such as the trap flag.
  • An instruction set that meets the Popek and Goldberg virtualization requirements makes it easier to write debugger software that runs on the same CPU as the software being debugged; such a CPU can execute the inner loops of the program under test at full speed, and still remain under debugger control.
  • In-system programming allows an external hardware debugger to reprogram a system under test (for example, adding or removing instruction breakpoints). Many systems with such ISP support also have other hardware debug support.
  • Hardware support for code and data breakpoints, such as address comparators and data value comparators or, with considerably more work involved, page fault hardware.[6]
  • JTAG access to hardware debug interfaces such as those on ARM architecture processors or using the Nexus command set. Processors used in embedded systems typically have extensive JTAG debug support.
  • Micro controllers with as few as six pins need to use low pin-count substitutes for JTAG, such as BDM, Spy-Bi-Wire, or debugWIRE on the Atmel AVR. DebugWIRE, for example, uses bidirectional signaling on the RESET pin.

Debugger front-ends

Some of the most capable and popular debuggers implement only a simple command line interface (CLI)—often to maximize portability and minimize resource consumption. Developers typically consider debugging via a graphical user interface (GUI) easier and more productive.[citation needed] This is the reason for visual front-ends, that allow users to monitor and control subservient CLI-only debuggers via graphical user interface. Some GUI debugger front-ends are designed to be compatible with a variety of CLI-only debuggers, while others are targeted at one specific debugger.

Debugging is often used to illegally crack or pirate software, which is usually illegal even when done non-maliciously. Crackme's are programs specifically designed to be cracked or debugged. These programs allow those with debuggers to practice their debugging ability without getting into legal trouble.

List of debuggers

Some widely used debuggers are:

Earlier minicomputer debuggers include:

Mainframe debuggers include:

See also

References

Citations

  1. ^ Aggarwal and Kumar, p. 302.
  2. ^ Aggarwal and Kumar 2003, p. 301.
  3. ^ Aggarwal and Kumar, pp. 307-312.
  4. ^ O'Callahan, Robert; Jones, Chris; Froyd, Nathan; Huey, Kyle; Noll, Albert; Partush, Nimrod (2017). "Engineering Record And Replay For Deployability Extended Technical Report". arXiv:1705.05937 [cs.PL].
  5. ^ Philip Claßen; Undo Software. "Why is reverse debugging rarely used?". Programmers Stack Exchange. Stack Exchange, Inc. Retrieved 12 April 2015.
  6. ^ Aggarwal and Kumar 2003, pp. 299-301.

Sources

Read other articles:

ركام طبقيمعلومات عامةصنف فرعي من سحاب طبقيسحاب ركاميlow-level cloud (en) جانب من جوانب قائمة أنواع السحب الاسم المختصر Sc (باللغات متعددة) موقع الويب cloudatlas.wmo.int… تعديل - تعديل مصدري - تعديل ويكي بيانات تحتاج هذه المقالة إلى الاستشهاد بمصادر إضافية لتحسين وثوقيتها. فضلاً ساهم في تطوير

 

ePrix Cape Town 2023 Ronde ke-5 dari Kejuaraan Formula E musim 2022–2023← Lomba sebelumnyaLomba berikutnya → Detail perlombaanTanggal 25 Februari 2023 (2023-02-25)Nama resmi 2023 Cape Town ePrixLokasi Sirkuit Jalan Raya Cape Town, Cape Town, Afrika SelatanSirkuit Sirkuit Jalan RayaPanjang sirkuit 2,921 km (1,815 mi)Posisi polePembalap Sacha Fenestraz NissanWaktu 1:07.848Putaran tercepatPembalap Jean-Éric Vergne DS PenskeWaktu 1:09.740 putaran ke-17Pod...

 

 Nota: Para outras cidades com este nome, veja Oliva. Coordenadas: 45° N 9° 11' E Oliva Gessi    Comuna   Localização Oliva GessiLocalização de Oliva Gessi na Itália Coordenadas 45° N 9° 11' E Região Lombardia Província Pavia Características geográficas Área total 3 km² População total 200 hab. Densidade 66,7 hab./km² Altitude 245 m Outros dados Comunas limítrofes Calvignano, Casteggio, Corvino San Quirico, Montalto Paves...

Serpentine Gallery Pavilion (2002) Cecil Balmond (26 februari 1943) is een wereldwijd bekend ontwerper, kunstenaar, wiskundige, denker en schrijver. Hij is geprezen als een van de belangrijkste krachten in de hedendaagse architectuur van vandaag. In 2003 ontving hij de prestigieuze RIBA Charles Jencks Award for Theory in Practice en was hij ook geselecteerd voor de Gengo Matsuiprijs, een van de hoogste onderscheidingen voor bouwkundige ingenieurs in Japan voor zijn structuurontwerp voor de Se...

 

This article needs to be updated. Please help update this article to reflect recent events or newly available information. (March 2020) Ambassador of Saint Vincent and the Grenadines to the United StatesIncumbentLou-Anne Gaylene Gilchristsince October 26, 2016Inaugural holderHudson Kemul TannisFormationDecember 8, 1981 The Vincentian ambassador in Washington, D. C. is the official representative of the Government in the Kingstown to the Government of the United States. List of representa...

 

Racimo de silvaner. La silvaner o sylvaner es una variedad de uva blanca que crece sobre todo en la región francesa de Alsacia y en Alemania. En Alemania suele usarse como componente del liebfraumilch y la producción aumentó en la década de 1970 en detrimento de la calidad. Aunque los vinos alsacianos de esta variedad estaban considerados los más simples, en 2006 se incluyó entre las variedades que podían usarse en la denominación Alsace Grand Cru, junto con las cuatro uvas nobles de ...

Dieser Artikel behandelt die französische Sängerin Imany; zur britischen Sängerin siehe Imaani. Imany im Europapark in Rust (2017) ChartplatzierungenErklärung der Daten Alben[1] The Shape of a Broken Heart   DE 47 06.07.2012 (5 Wo.)   CH 36 22.05.2011 (8 Wo.)   FR 19 Platin 14.05.2011 (115 Wo.) Sous les jupes des filles   FR 84 07.06.2014 (4 Wo.) The Wrong Kind of War   DE 19 02.09.2016 (6 Wo.)   AT 23 09.09.2016 (3 ...

 

Stamp of Kenya depicting the national flag and ensignia. Stamp commemorating the founding of the Republic of Kenya. This is a survey of the postage stamps and postal history of Kenya. British colonial issues Main articles: Postage stamps and postal history of British East Africa; Postage stamps and postal history of East Africa and Uganda Protectorates; and Postage stamps and postal history of Kenya, Uganda, Tanganyika Kenya used stamps of British East Africa Company (1890-1895), British East...

 

American technology company, 1982–2018 Lotus SoftwareTypeSubsidiaryIndustryComputer softwareFounded1982; 41 years ago (1982) (as Lotus Development Corporation)HeadquartersCambridge, Massachusetts, U.S.ProductsLotus 1-2-3 Lotus AgendaLotus ConnectionsLotus DominoLotus Domino Web AccessLotus ExpeditorLotus Forms Lotus Freelance Graphics Lotus MagellanLotus ManuscriptLotus NotesLotus Notes TravelerLotus QuickrLotus Sametime Lotus SmartSuite Lotus SymphonyLotusWorks[1]...

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Februari 2023. Artikel ini perlu dikembangkan agar dapat memenuhi kriteria sebagai entri Wikipedia.Bantulah untuk mengembangkan artikel ini. Jika tidak dikembangkan, artikel ini akan dihapus. Aliansi Wartawan Subang atau Awas adalah organisasi profesi jurnalis tingk...

 

For other places with the same name, see Yongsan-dong. Place in South KoreaYongsan-dongKorean transcription(s) • Hangul용산동 • Hanja龍山洞 • Revised RomanizationYongsan-dong • McCune–ReischauerYongsan-tongCountrySouth KoreaArea • Total1.96 km2 (0.76 sq mi)Population (2013)[1] • Total12,612 • Density6,400/km2 (17,000/sq mi) Yongsan-dong is a ward of Yongsan-gu in S...

 

̈1298–1886 northeastern Somali kingdom This article is about the early modern Somali Sultanate. For the clan, see Warsangali. Warsangali SultanateSaldanadda Warsangeli سلطنة الورسنجليPossibly late 12th-early 17th century–1887Map of the Warsangali Sultanate circa, 1857CapitalLas KhoreyCommon languagesSomaliReligion IslamGovernmentMonarchySultan History • Established Possibly late 12th-early 17th century• Disestablished 1887 Area• Total54,2...

Bài viết hoặc đoạn này cần người am hiểu về chủ đề này trợ giúp biên tập mở rộng hoặc cải thiện. Bạn có thể giúp cải thiện trang này nếu có thể. Xem trang thảo luận để biết thêm chi tiết. Khuôn mặt sợ hãi của chú bé trong hoàn cảnh xa lạ Các cung bậc củaCảm xúc Ở động vật Trí tuệ xúc cảm Tâm trạng Các cảm xúc Bất an Buồn Chán Cô đơn Đam mê Đau khổ Đồng cảm Ganh tị...

 

No debe confundirse con el guiso ají. Diferentes tipos de pimientos en un mercado de calle en São Paulo (Brasil) Nombres en español para el fruto picante de Capsicum, por países. Se llama chile (del náhuatl chīlli, ˈt͡ʃiːlliⓘ; en México y Centroamérica), ají (del taíno haxí; en Sudamérica y las Antillas) o guindilla (en España) a varios pimientos picantes. Son los frutos (bayas) de diversas especies de plantas del género Capsicum, de la familia de las solanáceas. Recibe d...

 

This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help to improve this article by introducing more precise citations. (December 2014) (Learn how and when to remove this template message) 1993 studio album by Father MCSex Is LawStudio album by Father MCReleasedJune 15, 1993Recorded1992-1993GenreHip hop, East Coast hip-hopLength46:24LabelUptownProducerTeddy Riley, Pete Rock, Clark Kent...

The list of shipwrecks in 1944 includes ships sunk, foundered, grounded, or otherwise lost during 1944. This is a dynamic list and may never be able to satisfy particular standards for completeness. You can help by adding missing items with reliable sources. table of contents ← 1943 1944 1945 → Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Unknown date References January Main article: List of shipwrecks in January 1944 February Main article: List of shipwrecks in Febru...

 

Lihat pula: Julius Caesar Julius Caesar adalah sandiwara tragedi karya William Shakespeare yang menggambarkan konspirasi terhadap Julius Caesar, pembunuhannya, dan kejadian setelahnya. Sandiwara ini adalah salah satu dari beberapa sandiwara Romawi yang ia tulis, termasuk di antaranya Coriolanus dan Antonius dan Cleopatra. Kisah Julius Caesar Tokoh utama Julius Caesar Octavius Caesar, Marcus Antonius, Marcus Aemilius Lepidus, triumvirat Para senator Para konspirator Lihat pula Et tu, Brute? lb...

 

Unicameral legislature of the Indian state of Gujarat 15th Gujarat Assembly ←14th Gujarat Assembly OverviewLegislative bodyGujarat Legislative AssemblyMeeting placeVithalbhai Patel Bhavan, Gujarat Vidhan Sabha, GandhinagarTerm12 December 2022 –Election2022 Gujarat Legislative Assembly electionGovernmentBJPOppositionINCWebsitewww.gujaratassembly.gov.inMembers182SpeakerShankar Chaudhary, BJPDeputy speakerJethabhai Ahir, BJPChief MinisterBhupendrabhai Patel, BJPLeader of OppositionA...

Railway station in Saga Prefecture, Japan Karatsu LineOverviewOwner JR KyushuLocaleSaga PrefectureTerminiKubotaNishi-KaratsuStations13ServiceTypeRegional railTechnicalLine length42.5 km (26.4 mi)Number of tracksSingleTrack gauge1,067 mm (3 ft 6 in)Electrification1,500 V DC, overhead catenary (Karatsu to Nishi-Karatsu) Route map Map of Japan with the Karatsu Line highlighted in red The Karatsu Line (唐津線, Karatsu-sen) is a regional railway line in Saga Prefec...

 

Indian actress (born 1995) Sara Ali KhanKhan in 2018BornSara Ali Khan Pataudi (1995-08-12) 12 August 1995 (age 28)Bombay, Maharashtra, IndiaAlma materColumbia University (BA)OccupationActressYears active2018–presentParentsSaif Ali KhanAmrita SinghFamilyPataudi familySingh-Virk family Sara Ali Khan Pataudi (pronounced [saːɾa əˈli xaːn]; born 12 August 1995) is an Indian actress who works in Hindi films. Born into the Pataudi family, she is the daughter of actors A...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!